Forum Discussion
Captain_Jack909
3 years agoFrequent Visitor
Sumx for Max-value per Sub-category
Hello All I am new towards Power BI , and I am struggling with getting a sumx for max-value per subcategory. really appreciate if someone can help me ! I have a table which contains dimensions :...
RiemuRiku
2 years agoFrequent Visitor
Hi!
Had similiar issue, ran into your post.
Solved it this way in my case, hope you can use it too!
Had similiar issue, ran into your post.
Solved it this way in my case, hope you can use it too!
CumulativeZoneWeight_WithScopeAndTotal =
VAR subCategoryMax =
SUMMARIZE(Z_KrussMain, //returns table
Z_KrussMain[ZoneNr], //GroupBy columns
"Weight",MAX(Z_KrussMain[CumulativeZoneWeight])) // Columns to create
RETURN
IF(ISINSCOPE(Z_KrussMain[ZoneNr]),
MAX(Z_KrussMain[CumulativeZoneWeight]), // in scope, sublevel data. -> showing sublevel data
SUMX(subCategoryMax,[Weight]) // Sum the previously generated table
)