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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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!:
Mastering Power BI 2nd Edition

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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.