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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors