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])) )

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])) )

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 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!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors