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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I'm trying to apply a conditional formatting to my visual matrix.
I have two levels (LEVEL 1, LEVEL 2) which have different measures which I will apply to set my condtional formatting.
I've read I can use ISINSCOPE:
MEASURE FOR COLORING
Solved! Go to Solution.
@MCacc , you should in reverse order. So if level one is above in a visual and level 2 is below, then use Level2, level 1
MEASURE FOR COLORING
Hey,
ISINSCOPE in combination with a matrix works from top to bottom. The highest rank is always in scope, and the ranks below it only when expanded.
SWITCH also works from top to bottom on an exclusion basis. Therefore first use the LVL2 condition and then the LVL1 condition:
MEASURE FOR COLORING =
VAR LEV_1 =
ISINSCOPE ( TABLE[LEVEL 1] )
VAR LEV_2 =
ISINSCOPE ( TABLE[LEVEL 2] )
RETURN
SWITCH ( TRUE (), LEV_2, [MEASURE FOR LEVEL 2], LEV_1, [MEASURE FOR LEVEL 1] )
Hey,
ISINSCOPE in combination with a matrix works from top to bottom. The highest rank is always in scope, and the ranks below it only when expanded.
SWITCH also works from top to bottom on an exclusion basis. Therefore first use the LVL2 condition and then the LVL1 condition:
MEASURE FOR COLORING =
VAR LEV_1 =
ISINSCOPE ( TABLE[LEVEL 1] )
VAR LEV_2 =
ISINSCOPE ( TABLE[LEVEL 2] )
RETURN
SWITCH ( TRUE (), LEV_2, [MEASURE FOR LEVEL 2], LEV_1, [MEASURE FOR LEVEL 1] )
Thank you so much, it works!
@MCacc , you should in reverse order. So if level one is above in a visual and level 2 is below, then use Level2, level 1
MEASURE FOR COLORING
Thanks! it works as well!!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 62 | |
| 50 | |
| 45 |