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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Don't want recalculate with 100% bar chart

Hi Power BI Experts,

 

Is there a DAX formula to prevent the 100% bar chart from recalculating percentages if I exclude a category?

 

Here is my DAX. 

Knowledge % of Row Total =
DIVIDE(
COUNT('Progress Knowledge'[Knowledge Category] ) ,
CALCULATE(
COUNT('Progress Knowledge'[Knowledge Category] ) ,
REMOVEFILTERS('Progress Knowledge'[Knowledge Rating] , 'Progress Knowledge'[Progress Rating Scale],'Progress Knowledge'[Knowledge Category] )
) )

 

quipmaster_0-1665699737841.png

 

But if I exclude a percentage, the graph is recalculated.

 

quipmaster_1-1665699812683.png

 

quipmaster_2-1665699826864.png

 

I thought the Remove filters statement would prevent the recalculation but it does not. 

REMOVEFILTERS('Progress Knowledge'[Knowledge Rating] , 'Progress Knowledge'[Progress Rating Scale],'Progress Knowledge'[Knowledge Category] )
) )
 
Is the 100% bar chart the exception to the rule of RemoveFilters function?
 
Any nudge is greatly appreciated.
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , 100% Stacked bar chart will calculate its own %. You can calculate % and use the Stacked bar visual, there removefilter, all , all except can help as per need

 

Divide([Meausre], calculate([Meausre], removefilter(Table, Table[Legend])) )

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @amitchandak ,

 

That is correct. Thank you.

 

 

amitchandak
Super User
Super User

@Anonymous , 100% Stacked bar chart will calculate its own %. You can calculate % and use the Stacked bar visual, there removefilter, all , all except can help as per need

 

Divide([Meausre], calculate([Meausre], removefilter(Table, Table[Legend])) )

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.

Top Solution Authors