Forum Discussion
Slicer Selection
- 3 years ago
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
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.
- bcdobbs3 years agoCommunity Champion
I like ThxAlot solution in DAX.
You could apply it to all measures by using a calculation group (configured via tabular editor). Just replace [val] with SELECTEDMEASURE(). Am away from a computer at the moment but can demo it later if you'd like.
- bcdobbs3 years agoCommunity Champion
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 - Anonymous3 years agoNot applicable
Thank you bcdobbs and ThxAlot I really appreciate it. I have read about the tabular editor, and I have not used it (until now). If you could help me, it would be great. I am looking to create a "solution" that will be more generic, and my future clients could have an easy way to edit it.
- bcdobbs3 years agoCommunity Champion
Scroll down the thread. Have sent a demo and a link to a SQLBI intro.
Calculation group editing I believe is coming to native power bi desktop at some point but not sure when.
If you want it to be as easy as possible for end users my original suggestion of a bridge table might be a better way forward (although doubt the calc group would need changing)