The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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! | |