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

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

Reply
Anonymous
Not applicable

Maximum for a measure

Hello,

 

Here is my problem. 

 

I have companies and I have 3 categories, C, D and H. (There are relationship between tables)

 

I measured deviations, and I made a matrix which shows me per company (rows) and per category (colums) the deviations. 

 

Now, I want to calculate the maximum value all categories for each company. 

Which means, I want to see the maximum value between C, D and H for each company. 

 

For example, a company A has a deviation of 10 for C, of 20 for D and of 15 for H. The maximum value would be 20.

 

Thank you for your help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

The solution to my problem is :

 

Max Value deviation = MAXX(DISTINCT(Categories),[Deviation])

View solution in original post

6 REPLIES 6
VasTg
Memorable Member
Memorable Member

@Calice

Do you want to see the value 20 in all categories or only at the enterprise level?

Have you tried to click the down arrow on the deviation measure and select Maximum?

image.pngThe image is just an example of where to find the down arrow

If it helps, mark it as a solution

Congratulations are also good

Connect on LinkedIn
jstorm
Resolver III
Resolver III

What you need is a measure that removes the category filter.  Something like:

 

CALCULATE( MAX( deviation), ALL( Categories ) )

 

Although I'm not explicitly sure how your tables are set up.  The ALL() filter returns all values from 'Categories' table with all previously applied filters removed.  Adding this measure to your table should return your highest value in any category fro each company.

Anonymous
Not applicable

No this doesn't work unfortunately... 

 

Anonymous
Not applicable

@VasTg @jstorm 

 

Let me be more precise. 

 

Before I had this measure :

Max Value deviation =
VAR ValueTable =
UNION(
ROW("Value",[Deviation C]),
ROW("Value",[Deviation D]),
ROW("Value",[Deviation H])
)
RETURN
MAXX(ValueTable,[Value])
 
It worked because I had 3 different measures for each categories.
But now I set up a table with the 3 categories and made relationship between all tables, and created a matrix. 
 
But I want the result as I had with this formula.

This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

 

or maybe



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

The solution to my problem is :

 

Max Value deviation = MAXX(DISTINCT(Categories),[Deviation])

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.