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
MSFTPBI
Frequent Visitor

Max of MAX Meassure

Hello,

I have a meassure called

MAX_Time =  MAX(COl1)
Now I want to get MAX_Time by each category, I must use MAX_Time meassure, beasue MAX_Time  has a long logic with various variables.
I tried
MAXX(
CalculateTABLE (
VALUS (TABLENAME[Category]),
ALLSELECTED(TABLENAME[CATEGORY])
),
[MAX_Time]
)

MSFTPBI_0-1741952667324.png

 



1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@MSFTPBI  create a summary table for each category and then apply the MAX_Time measure to each category.

DAX
CategoryMaxTime =
SUMMARIZE(
TABLENAME,
TABLENAME[Category],
"MaxTime", [MAX_Time]
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

4 REPLIES 4
nilendraFabric
Super User
Super User

try this

MAX_Time_By_Category =
MAXX(
VALUES(TABLENAME[Category]),
CALCULATE(
[MAX_Time],
ALLSELECTED(TABLENAME[Category])
)
)

MFelix
Super User
Super User

Hi @MSFTPBI ,

 

Don't know what other columns you have on your model that may impact that category because you show 3 lines but no aggregation. Instead of the category A,B that you are using to get the MAX you should use the level below so when you do the aggregation it will pick up the desired result.

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



There are many columns in the table, let's say I want my logic to work with category and Color

bhanu_gautam
Super User
Super User

@MSFTPBI  create a summary table for each category and then apply the MAX_Time measure to each category.

DAX
CategoryMaxTime =
SUMMARIZE(
TABLENAME,
TABLENAME[Category],
"MaxTime", [MAX_Time]
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.