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
Anonymous
Not applicable

Maxx working vs Minx not working

Hello, I have a measure to calculate the difference in percentage billed (see in Results section).

% Billed = sum(Hours_billed[Hours_billed])/sum(Hours_planned[Hours_planned])-1
 
I want to get the max and min value of those results. As you can see, Max value 14,81% is right but -29,82% is not. I use the exact same formula logic for both measures. 
 
Max = Maxx(all(Employees[Office]),[% Billed])
Min = Minx(all(Employees[Office]),[% Billed])
 
I would like to understand why the Minx isn't working properly. Thank you
 
guillaume_boism_0-1635437797604.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello amitchandak responded but his message disappeared. However both of his solutions were working. Thank you

 

Max = Maxx(values(Employees[name]),[% Billed])
Min = Minx(values(Employees[name]),[% Billed])

 

or

 

Max = calculate( Maxx(values(Employees[name]),[% Billed]) , all(Employees) )
Min = calculate( Minx(values(Employees[name]),[% Billed]) , all(Employees) )

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hello amitchandak responded but his message disappeared. However both of his solutions were working. Thank you

 

Max = Maxx(values(Employees[name]),[% Billed])
Min = Minx(values(Employees[name]),[% Billed])

 

or

 

Max = calculate( Maxx(values(Employees[name]),[% Billed]) , all(Employees) )
Min = calculate( Minx(values(Employees[name]),[% Billed]) , all(Employees) )

Greg_Deckler
Super User
Super User

@Anonymous Pretty sure that needs to be:

Max = Maxx(SUMMARIZE(all('Employees'),[Office],"__Billed",[% Billed]),[__Billed])

Min = Minx(SUMMARIZE(all('Employees'),[Office],"__Billed",[% Billed]),[__Billed])


@ 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!:
The Definitive Guide to Power Query (M)

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

Hello, unfortunately your formula gives the same result. I posted the solution above. Thank you

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.