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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I was trying to test if I can rank rows based on their hierarchy level group using the isinscope function in a switch statement.
Initially I tested the following:
Solved! Go to Solution.
Hello @Nadim1313 ,
you should in reverse order. So if level one is above in a visual and level 2 is below, then use Level2, level 1
Test is in scope =
SWITCH(
TRUE(),
ISINSCOPE(DimProductSubcategory[ProductSubcategoryName]),
2,
ISINSCOPE(DimProductCategory[ProductCategoryName]),
1
)
Proud to be a Super User! | |
Great thanks! Works perfectly now
Hello @Nadim1313 ,
you should in reverse order. So if level one is above in a visual and level 2 is below, then use Level2, level 1
Test is in scope =
SWITCH(
TRUE(),
ISINSCOPE(DimProductSubcategory[ProductSubcategoryName]),
2,
ISINSCOPE(DimProductCategory[ProductCategoryName]),
1
)
Proud to be a Super User! | |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.