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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sja133
Frequent Visitor

Calculating measure total without visual level filter (not slicer)

I thought I had this, but it's not working for some reason and thought maybe the forum might be able to help. 

 

I'm developing a logistics measure for Rush Orders with no charge as a % of Total order by customer. I am currently displaying a table visual which has a few visual filters on, one of which is "Charge Description" with the filter on "Rush Order No Charge" (I need this filter on for a few other measures to work).

 

I created the below measure 


% RushOrders no Chg =
var RO = CALCULATE([# Orders Shipped],Data[Charge_Desc] = "RUSH ORDER NO CHARGE")
var TotOrd = CALCULATE([# Orders Shipped],ALLEXCEPT(Data,Data[CustNumber])
return Divide(RO,TotOrd,0)

When I test the individual variables, RO works as intended with/without the visual level filter mentioned above. However TotOrd seems to show RO's result when I do the above formula and turn on the filter Rush Order No Charge. I would have thought specifying the Charge_Desc column within the ALL function would have removed the effect of the visual level filter, but it seems to not be working. 
 
Summary of the results I'm getting: 
 
Actual number of Orders 168 (i.e. this is what TotOrd should be showing always)
 
Charge_Desc filter off:
RO shows 19
TotOrd shows 168
 
Charge_Desc filter on:
RO shows 19
TotOrd shows 19
 
Appreciate your ideas on this.
1 ACCEPTED SOLUTION

@amitchandak i was prepping the data for this question, but i trialled the ALLEXCEPT formula again and seemed to have gotten an acceptable solution. thank you for trying to help 😄

View solution in original post

5 REPLIES 5
sja133
Frequent Visitor

I have also tried the below, but still no luck

TotOrd = CALCULATE([# Orders Shipped],ALL(Data[Charge_Desc])

@sja133 , try these

 

TotOrd = CALCULATE([# Orders Shipped],removefilters(Data[Charge_Desc]))
TotOrd = CALCULATE([# Orders Shipped],ALL(Data))

 

TotOrd = CALCULATE([# Orders Shipped],ALLSELECTED(Data))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for your suggestions @amitchandak , unfortunately these end up giving me the same result when i turn on the visual level filter. 

@sja133 , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak i was prepping the data for this question, but i trialled the ALLEXCEPT formula again and seemed to have gotten an acceptable solution. thank you for trying to help 😄

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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