Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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]
)
Solved! Go to Solution.
@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]
)
Proud to be a Super User! |
|
try this
MAX_Time_By_Category =
MAXX(
VALUES(TABLENAME[Category]),
CALCULATE(
[MAX_Time],
ALLSELECTED(TABLENAME[Category])
)
)
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
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThere are many columns in the table, let's say I want my logic to work with category and Color
@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]
)
Proud to be a Super User! |
|
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |