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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.