cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
quipmaster
Helper II
Helper II

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

@quipmaster , 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])) )



Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

View solution in original post

2 REPLIES 2
quipmaster
Helper II
Helper II

Hi @amitchandak ,

 

That is correct. Thank you.

 

 

amitchandak
Super User
Super User

@quipmaster , 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])) )



Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Dev Camp Session 30

Ted's Dev Camp - January 26, 2023

This session will provide guidance and teach campers the skills required to build Power BI reports that support multiple languages.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors