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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Summarize the Matrix Visualization

Hi All, 

I need to summarize the below matrix visualization at Level 3 Hirerachy (Category 3) 

weicaomis123_0-1629411777825.png

 

 

 

Condition for Color rollup - if anything under category3 is Red - Then it show Red - (order - 1) Red, 2) Yellow, 3) Blue)


I need to summarrize the above matrix to achieve the below result - 

weicaomis123_4-1629402084212.png
Link to sample dataset - Sample Data and Visualization - Pbix file 


Can someone please help me to achieve the above result. 

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Assuming Category4 is below catgegory 3 existing measure

 

measure =
var _C1 = count(filter(allselected(Table), Table[category3] = max(Table[category3]) && Table[category4] = "Red"), Table[category4])
var _C2 = count(filter(allselected(Table), Table[category3] = max(Table[category3]) && Table[category4] = "Yellow"), Table[category4])
return
if(isinscope(Table[category3]), Switch(true() ,
not(isblank(_C1)) , "Red" ,
not(isblank(_C2)) , "Yellow" ,
"Blue"
), [M1])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Assuming Category4 is below catgegory 3 existing measure

 

measure =
var _C1 = count(filter(allselected(Table), Table[category3] = max(Table[category3]) && Table[category4] = "Red"), Table[category4])
var _C2 = count(filter(allselected(Table), Table[category3] = max(Table[category3]) && Table[category4] = "Yellow"), Table[category4])
return
if(isinscope(Table[category3]), Switch(true() ,
not(isblank(_C1)) , "Red" ,
not(isblank(_C2)) , "Yellow" ,
"Blue"
), [M1])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.