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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
khappersett
Resolver I
Resolver I

Ignore Row Context in Measure

I am trying to return the maximum catalog date based on a certain slicer, but ignoring all other filters and row context. I am using the below measure:

 

most recent test = CALCULATE(MAX('Catalog Detail'[Release Date]), ALLEXCEPT('Catalog Detail','Catalog Detail'[Common Catalog Name]))

I have a Common Catalog Name selected in my slicer and you can see the possible release dates below, but in my table I am still returning 6/3/2016 for some rows. I want them to all say 6/2/2017. I believe this is because the wholesale IDs only bought items in the earlier catalog release, but I thought the ALLEXCEPT would return the max release date without giving context to the row. 

 

Capture.PNG

 

Any help is appreciated! Thanks!

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

HI @khappersett

 

I think you need to clear the filter context on the Wholesale ID field.  Try adding that field to your ALLEXCEPT function as a third parameter.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
Phil_Seamark
Employee
Employee

HI @khappersett

 

I think you need to clear the filter context on the Wholesale ID field.  Try adding that field to your ALLEXCEPT function as a third parameter.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark

 

Thank you so much!!!!! That worked! This is the code I used:

 

most recent test = CALCULATE(MAX('Catalog Detail'[Release Date]), ALLEXCEPT('Catalog Detail','Catalog Detail'[Common Catalog Name]), ALL('Account Detail'))

Cool.  Is 'Account Detail' the same field as 'Wholesale ID' ?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark

 

The Wholesale ID field is found in the Account Detail table.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors