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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
codyraptor
Resolver I
Resolver I

Calculate measure all except 1 filter

I need to create a measure that will calculate based on a filter and group...but exclude 1 slicer.  Example:  Dispatch Count needs to be total dispatch count by developed days...but not changed by invoice type.   Grss $$ needs to be total grss by developed days and be changed by invoice type.  That way the measure of Grss can be divided by Total Dispatch in order to get a breakdown of invoice type.   Below are the 2 formulas I've used so far...

This gives me the proper grss $$

Developed Grss = CALCULATE([Grss],FILTER(GROUPBY(ALLSELECTED(Invoice),'Dispatch Date'[FULL_DATE],Invoice[Days Developed]),Invoice[Days Developed]<=MAX(Invoice[Days Developed])))

 

This gives me 'almost' the correct dispatch count....but Invoice Type is still making a difference to the count when selected

Exp Disp Cnt Type = CALCULATE([Exp Disp Count],FILTER(GROUPBY(ALLSELECTED(Invoice),'Dispatch Date'[FULL_DATE],Invoice[Days Developed]),Invoice[Days Developed]<=MAX(Invoice[Days Developed])),ALL('Invoice Info'[Invoice Type]))

 

The Goal....

Days Developed = 30...Exp Disp Count = 50

Days Developed = 60...Exp Disp Count = 100 (cumulative total)

100 total stays the same no matter what I choose as an invoice type is the goal...and it has to be calculated in order to use it as a measure

 

 

5 REPLIES 5
v-yuezhe-msft
Employee
Employee

Hi @codyraptor,

Based on your description, you drag Invoice Type into a slicer and want to achieve the goal that Dispatch count is always same no matter what you choose in the Invoice Type slicer, right?

If that is the case, what is the formula of Dispatch count? Do Exp Disp Cnt Type and Dispatch count mean same thing? I note that you have used ALL() function to ignore all slicers and filters in Exp Disp Cnt Type formula, everything should work well. Would you mind sharing me sample data of your tables? I will test it in my Desktop.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

You are exactly right as far as the expectation.   Dispatch Count and EXP Dispatch Count are not the same.  Dispatch Count is just a simple distinct count of dispatches.

 

Exp Dispatch Count is disp count where invoice date is not null, grss dollars <> 0 and initial invoice date = Y.    Basically expensed dispatche count would be a distinct count of dispatches that have received an invoice.

How do I load sample data for you to review?

 

I see why ou asked about Exp vs regular Disp count now.  My example I put 'Disp Count'...I meant Exp Disp Count.  Sorry for the confusion.

Hi @codyraptor,


You can upload sample data to OneDrive and post shared link here. Also help to post formula of Dispatch Count.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

Sounds like you need to edit the visual interacdtions.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

The slicer will need to adjust the visualization...I wouldn't want to change that.  Another words...I'll have Grss $$ that "Will" get adjusted by the slicer...but dispatch count will 'not' get adjusted by the slicer.  The ultimate outcome will be Grss$$ (by slicer) divided by Dispatch count (total unaffected by slicer).

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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