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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bharukc
Helper I
Helper I

Color code the last value in matrix hierarchy before null value

I am creating a hierachy

Id level 1, level 2, level 3 level 4 level 5 

1.   A.          B.         C

2.   A.          D.         E.        F

3.   M.         N.        O.         P.        Q

 

With the code below, 

Measure = 
IF(
    ISINSCOPE('Table'[level 5]),
    IF(MAX('Table'[level 5]) = BLANK(),BLANK(),COUNT('Table'[Id])),
    IF(ISINSCOPE('Table'[level 4]),
    IF(MAX('Table'[level 4]) = BLANK(),BLANK(),COUNT('Table'[Id])),
    IF(ISINSCOPE('Table'[level 3]),
    IF(MAX('Table'[level 3]) = BLANK(),BLANK(),COUNT('Table'[Id])),
    IF(ISINSCOPE('Table'[level 2]),
    IF(MAX('Table'[level 2]) = BLANK(),BLANK(),COUNT('Table'[Id])),
    IF(ISINSCOPE('Table'[level 1]),
    IF(MAX('Table'[level 1]) = BLANK(),BLANK(),COUNT('Table'[Id]))
    ))))
    )

I was able to remove nulls in the hierarchy. I want to know if there is a way to tell the user by color coding the font of level name when it reaches the last hierarchy level before null starts.  

2 REPLIES 2
daXtreme
Solution Sage
Solution Sage

There probably is but... Would you care to give an example? Maybe a picture of what such a thing should look like, please?

@daXtreme 

 

In the picture below, C and its count, F and its count and Q and its count to be colored as red. So that people would know that is the last of hierarchy. 

 

B32D66DF-E0C4-4CDA-8C7B-62EF53EB780E.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.