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 September 15. Request your voucher.
I have a Hierarchy Slicer like above.
The fileds in this slicer owns:
As we can see, there are BLANK option in the secondary index. How to make this slicer like below:
When there are BLANK for secondary column, only show the first index. Thanks
BTW, I tried the Third Party visual, but it cannot show dropdown.
Solved! Go to Solution.
Hi @danielsun
Thank you for reaching out microsoft fabric community forum.
You want to show all first-level items in the slicer, but hide the (Blank) from the second level when it doesn’t exist.
Power BI's built-in slicer doesn’t natively support hiding blanks in ragged hierarchies, but here’s a quick workaround:
Use a custom table to clean up the hierarchy:
CustomHierarchy =
UNION(
SELECTCOLUMNS(
FILTER('YourTable', NOT ISBLANK('YourTable'[SecondLevel])),
"Level1", 'YourTable'[FirstLevel],
"Level2", 'YourTable'[SecondLevel]
),
SELECTCOLUMNS(
FILTER('YourTable', ISBLANK('YourTable'[SecondLevel])),
"Level1", 'YourTable'[FirstLevel],
"Level2", BLANK()
)
)
Use this CustomHierarchy table in your slicer — it keeps all first-level items and only includes second-level ones when available, so you avoid showing (Blank).
If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community
Thank you.
I have this same issue and couldn't find a simple workaround. Luckily, an older post recommended the custom visual 'Hierarchy Slicer' and that allowed the functionality of removing "(Blank)" as an option. 🙂 Good luck!
Hi @danielsun
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @danielsun
Thank you for reaching out microsoft fabric community forum.
You want to show all first-level items in the slicer, but hide the (Blank) from the second level when it doesn’t exist.
Power BI's built-in slicer doesn’t natively support hiding blanks in ragged hierarchies, but here’s a quick workaround:
Use a custom table to clean up the hierarchy:
CustomHierarchy =
UNION(
SELECTCOLUMNS(
FILTER('YourTable', NOT ISBLANK('YourTable'[SecondLevel])),
"Level1", 'YourTable'[FirstLevel],
"Level2", 'YourTable'[SecondLevel]
),
SELECTCOLUMNS(
FILTER('YourTable', ISBLANK('YourTable'[SecondLevel])),
"Level1", 'YourTable'[FirstLevel],
"Level2", BLANK()
)
)
Use this CustomHierarchy table in your slicer — it keeps all first-level items and only includes second-level ones when available, so you avoid showing (Blank).
If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community
Thank you.
Hi @Anonymous ,
Thanks for your reply.
I create a new table followed by your DAX. But under Level 2, there are still (BLANK):
I believe you have got what I mean. Yes, I need remove (Blank) firstly, then Let "ARVEST001" only have Level 1 selection, no expand button. Thanks
Hi, I tried. but I have to show the complete 1-level index. You way will filter out the 1st level index.