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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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))

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.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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