cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
codyraptor Regular Visitor
Regular Visitor

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
Super User
Super User

Re: Calculate measure all except 1 filter

Sounds like you need to edit the visual interacdtions.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

codyraptor Regular Visitor
Regular Visitor

Re: Calculate measure all except 1 filter

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

Moderator v-yuezhe-msft
Moderator

Re: Calculate measure all except 1 filter

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.
codyraptor Regular Visitor
Regular Visitor

Re: Calculate measure all except 1 filter

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.

Moderator v-yuezhe-msft
Moderator

Re: Calculate measure all except 1 filter

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.

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 206 members 2,250 guests
Please welcome our newest community members: