Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kygiam
New Member

Display only negative values in donut/ pie chart when both +ve and -ve values are available

I am having data with both positive and negative value as displayed below:

Screenshot 2022-02-18 123031.png

When visualising this data in donut/ pie chart, the charts is only showing positive value:

Screenshot 2022-02-18 123236.png

My ideal result is to show only negative value in donut charts, and showing both positive and negative value when i clicked on show as table. 

 

I managed to show only negative value in the charts with the DAX:

Measure = IF(SUM(Sheet1[Amount])>0,BLANK(),SUM(Sheet1[Amount]))

Screenshot 2022-02-18 123419.png

However, i do not wish to modify the positive number to blanks, this resulted the table not showing the categories with positive values.

 

Appreciate your help if anyone can help me figure out a better workaround.

 

 

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @kygiam 

 

Show as a table feature is to let you display the data that is being used to create the visual. When you use the Measure to return blank for positive values, blank values are used in this chart, so it will not display original positive values in the data table. Show the data that was used to create the Power BI visualization - Power BI | Microsoft Docs

 

I suggest that you could use a single table visual below the donut chart to show all negative and possible values directly, just like the first table in your original post. Then use your measure to show negative values in the donut chart.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

amitchandak
Super User
Super User

@kygiam , You can not show negative and positive together. If you want you can use absolute value using 

 

abs(sum(Sheet1[Amount]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.