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
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! | |
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!