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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TaylorLowrey
Frequent Visitor

Need help retrieving max value based on criteria

I am attempting to determine where in my facility a particular run is currently at.

I have multiple tables generating from different systems and I have created relationships between these tables. I assumed that I could put the values into a matrix and they would cross filter, however, I am always getting the max value of the entire related table as opposed to the max value of the rows which include the Run #.

Run Location Status Prod Run Table Expected Result Actual Result
           
           
LocationStatus Run  RunStatus RunStatus
A1 123A 1233 1234
B2 123A 1254 1254
C3 123B      
D4 123C      
   125A      
   125C      
   125D      

 

Any Idea's?

2 REPLIES 2
BekahLoSurdo
Resolver IV
Resolver IV

I would make the following Measure:

MaxStatus = CALCULATE( MAXX( ProdRunTable, RELATED( RunLocationStatus[Status] ) ), ALLEXCEPT( ProdRunTable, ProdRunTable[Run] ) )

Here are the tables / columns I made and the result:

MaxValue.PNG

That ended up giving me the same thing that I have been getting, however I do believe that I found a solution. 

LastArea = calculate(
max(RunLocationStatus[Status]),
ALLEXCEPT(RunLocationStatus,RunLocationStatus[locationName]))
 
My next endeavor will be to learn how to then take a count of that measures results.

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.