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
Anonymous
Not applicable

Cumulative Bar Chart - How to Hide Months Without Affecting Values

Is there a way to filter our columns in a bar chart without affecting the calculation? For instance, I have 10 production loss categories, but I only want to show the top 4. The loss columns are on the Axis, but anytime I filter our the ones I don't want to show, it recalculates the percentages. Is there any way to avoid this? 

 

Thanks

Jacob

1 REPLY 1
v-yuezhe-msft
Employee
Employee

Hi @Anonymous,

Take the following table for example, firstly create new columns using DAX below in the table.

%pecentage = 'Table'[Amount]/SUM('Table'[Amount])
RankColumn = RANKX(ALL('Table'),'Table'[%pecentage],,DESC)
1.PNG

Secondly, create bar chart using ProductSubcategory and %pecentage, then drag RankColumn to Visual level filters and set the value of RankColumn to “is less than or equal to 4”.
2.PNG


If the above steps doesn't help, please share sample data of your table here.


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.