Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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! |
|
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 32 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |