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

How to get only the MAX of all different maxes within a category?

For example

January 

A          5

B          3

C           8

D           2

February

A         10

B          3

C          2

D           12

 

For example, in January I would want the entire column to show 8, and Feb entire column should show 12. I want to show the max of the max. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I got this to work, 

 

fffffFund Cal Business Days Passed max per Date =
MAXX(
KEEPFILTERS(VALUES('date'[date])),
CALCULATE(SUM('Date'[Business Days Passed]),filter('date','date'[date]=today()-1)))

 

the business days passed is the max I'm trying to calculate. 

 

This formula works only for the current month wer're in. Right now for December it returns 9 down the whole column regardless of A, B, C and there's been 9 business days so far this month - yesterday. 

 

The problem is that it is now showing 9 down the column for every previous month too. What I need is for it to not override a previous month's max

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

Check out the pattern here:

 

https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

 

Generally, you are going to use a SUMMARIZE I believe along with a MAXX potentially.


@ 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

Thanks for the quick response. @Greg_Deckler

 

Could you provide more guidance with that article? Every example has the min or max grouped by a category,whereas I would like to show the max regardless of category. 

 

would the solution be something like, 

calculate(summarize(fact table, fact table[date],maxx(fact table[max measure]))

 

max measure meaning what is calculating my number column in my first post. 

 

Anonymous
Not applicable

I got this to work, 

 

fffffFund Cal Business Days Passed max per Date =
MAXX(
KEEPFILTERS(VALUES('date'[date])),
CALCULATE(SUM('Date'[Business Days Passed]),filter('date','date'[date]=today()-1)))

 

the business days passed is the max I'm trying to calculate. 

 

This formula works only for the current month wer're in. Right now for December it returns 9 down the whole column regardless of A, B, C and there's been 9 business days so far this month - yesterday. 

 

The problem is that it is now showing 9 down the column for every previous month too. What I need is for it to not override a previous month's max

Glad you got it working! Sorry, I was trapped delivering Power BI training all day yesterday!


@ 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...

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.