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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

How to get the MAX of a measure in DAX?

I have a measure called [Staff Performance] which is simply DIVIDE([Measure A], [Measure B])

 

On a matrix visual, this [Staff Performance] measure displays correctly = at daily and weekly levels.

The matrix has a drill-down hierarchy of Manager -> Staff -> Week -> Day. When the data displays at Manager level, I would like the a measure that will be the MAX([Staff Performance]) across all of the staff under the manager. 

But when I try this measure

 

Best Staff Performance := MAX([Staff Performance])

 

I receive an error: The MAX function only accepts a column reference as an argument.

How can I write a measure to do this?

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You can use this approach with MAXX().  This should give you the max employee for each Manager, and the overall MAXX in the "Total".

 

Max Employee Value = MAXX(VALUES(Table[Employee]), [Staff Performance])

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous ,

something like this

Best Staff Performance = calculate(MAX([Staff Performance]), allexpect(Table[Manager]))

 

in case you need to build hierarchy using the path , refer -https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
mahoneypat
Microsoft Employee
Microsoft Employee

You can use this approach with MAXX().  This should give you the max employee for each Manager, and the overall MAXX in the "Total".

 

Max Employee Value = MAXX(VALUES(Table[Employee]), [Staff Performance])

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors