This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi everybody, I am having some trouble with matrix. How can I check if the top level or a lower level is selected in a matrix hierarchy. I cannot use the isinscope function because I only want to process the selected item, not every item at the same level in the matrix.
Solved! Go to Solution.
Hi,@kemaley
Regarding the issue you raised, my solution is as follows:
1.You can create other measures that return values that represent hierarchy levels based on what is selected, here is my example:
Use an IF statement to check if you are at this hierarchy level and, based on your situation, use the ISFILTERED() function as an alternative technique when the ISINSCOPE() function is not available:
HierarchyLevel =
IF(
ISFILTERED('LEVEL'[class3]),
"class3",
IF(
ISFILTERED('LEVEL'[class2]),
"class2",
IF(
ISFILTERED('LEVEL'[class1]),
"class1",
"None"
)
)
)
Here's my final result, which I hope meets your requirements.
2.You can also look directly at the icons below the matrix visualization to determine, if you have expanded the hierarchy:
3.Here is the relevant documentation:
ISFILTERED function (DAX) - DAX | Microsoft Learn
Drill mode in the Power BI service - Power BI | Microsoft Learn
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It works! Thank you so much.
Hi,@kemaley
Regarding the issue you raised, my solution is as follows:
1.You can create other measures that return values that represent hierarchy levels based on what is selected, here is my example:
Use an IF statement to check if you are at this hierarchy level and, based on your situation, use the ISFILTERED() function as an alternative technique when the ISINSCOPE() function is not available:
HierarchyLevel =
IF(
ISFILTERED('LEVEL'[class3]),
"class3",
IF(
ISFILTERED('LEVEL'[class2]),
"class2",
IF(
ISFILTERED('LEVEL'[class1]),
"class1",
"None"
)
)
)
Here's my final result, which I hope meets your requirements.
2.You can also look directly at the icons below the matrix visualization to determine, if you have expanded the hierarchy:
3.Here is the relevant documentation:
ISFILTERED function (DAX) - DAX | Microsoft Learn
Drill mode in the Power BI service - Power BI | Microsoft Learn
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 25 | |
| 21 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 44 | |
| 20 | |
| 18 | |
| 18 |