Forum Discussion
Slicer Selection
Hello everybory, I hope you are doing well. I have a simple question, and I would like your help.
I need to create a different slicer filter here, and I do not know how to handle it.
The following image represents my current model.
What do I want to do?
When I select Province A in my slicer, in fact, I wanna choose Provinces A,B,C,D
When I select Province B in my slicer, in fact, I wanna choose Provinces B,C,D,
and so on...
It is essential to say that I do not have a hierarchy here. My provinces are all on the same level.
My Power Bi sample is available here.
https://drive.google.com/file/d/1PvZxomKnPm-fjSii9j3uW0itK566QA5Y/view?usp=sharing
Thank you
See what you make of this:
There is a calculation group configured via tabular editor:
----------------------------------------------------------- -- Calculation Group: 'Province Selection Calulation Group' ----------------------------------------------------------- CALCULATIONGROUP 'Province Selection Calulation Group'[Name] Precedence = 1 CALCULATIONITEM "Select Provinces" = VAR MinIndex = MIN ( Province[Index] ) RETURN CALCULATE( SELECTEDMEASURE(), REMOVEFILTERS( Province[Povince] ), Province[Index] >= MinIndex )Basically the same measure but you don't need the calcualted table bit.
Then you just drop the calculation group into the visual level filter pane:
This article explains more on creating them using tabular editor:
Introducing Calculation Groups - SQLBI
8 Replies
- ThxAlotSuper User
- AnonymousNot applicable
I liked it, and it works. However, I did not mention I have 53 measures, and in this case I would need to change all of them.
- bcdobbsCommunity Champion
I think the easiest way would be to use a bridge table with two columns:
Province Selection, Included
A, A
A, B
A, C
A, D
B, B
B, C
B, D
C, C
C, D
D, D
Then create a many to many relationship with filter in one direction from it to the City Table.