Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I have a situation in PowerBI where I am trying to create a hierarchical slicer that allows the user to select only one item from each of the hierarchies.
The typical single select feature only allows me to select one item even if items are in different hierarchies. I also looked at the user created 'HierarchySlicer' which limits to selection of the leaves only (closer to what I want), but I would want to be able to select only one leaf per category.
An example of what I am talking about it below. In which I would want a user to be able to select only one of the options from 'EQ', but also select or not select one of the options in 'CS' and 'WS' in addition to thier selection in 'EQ'
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
Try formula like below:
M1 = SELECTEDVALUE('Table'[Category])
M2 = SELECTEDVALUE('Table'[Category])
result =
VAR combine =
CALCULATE (
MAX ( 'Table'[Category] ),
FILTER ( ALL ( 'Table' ), 'Table'[Category] = [M1] )
) & "+"
& CALCULATE (
MAX ( 'Table'[Category] ),
FILTER ( ALL ( 'Table' ), 'Table'[Category] = [M2] )
)
RETURN
IF ( combine IN { "B+C", "B+H", "G+C", "G+H" }, 1, 0 )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Try formula like below:
M1 = SELECTEDVALUE('Table'[Category])
M2 = SELECTEDVALUE('Table'[Category])
result =
VAR combine =
CALCULATE (
MAX ( 'Table'[Category] ),
FILTER ( ALL ( 'Table' ), 'Table'[Category] = [M1] )
) & "+"
& CALCULATE (
MAX ( 'Table'[Category] ),
FILTER ( ALL ( 'Table' ), 'Table'[Category] = [M2] )
)
RETURN
IF ( combine IN { "B+C", "B+H", "G+C", "G+H" }, 1, 0 )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous You need to use CNTRL keyword and then you can select multiple values in a hierarhial slicer like below
Hi Mohan,
Thanks for your comment, but I am not sure you understood the question. In your example I would want the user to only be able to select a combination of either B or G from Prof1 and either C or H from Prof2, but not a combination of (B+G or C+H). The only acceptible selections would be B+C, B+H, G+C, or G+H.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
130 | |
80 | |
52 | |
38 | |
35 |
User | Count |
---|---|
204 | |
81 | |
71 | |
53 | |
50 |