Forum Discussion
How to get default slicer value for second slicer?
- Anonymous2 years ago
Hi AkhilReddyN ,
Here are the steps you can follow:
For the slicer that comes with Power BI, we can not get it. But we can get the three point in the "Visualizations", and we click the "Get more visual":
Then we find the "Preselected Slicer" and add the visual to our Power Bi Desktop.
First , we need to create a table with one column , and the value is True and False, like this:
Second, we can create a measure to define that we need default preselection values. If we need default preselection then we return True, otherwise we return False.
Measure = var _select=SELECTEDVALUE('Table'[Column1]) var _step=SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[Column1]=_select),"Column2",'Table'[Column2]) return SWITCH( TRUE(), _select="cricket"&&MAX('Table'[Column2])="average",TRUE(), ISFILTERED('Table'[Column1])=TRUE()&&MAX('Table'[Column2]) in _step&&_select<>"cricket",TRUE(), ISFILTERED('Table'[Column1]) =FALSE()&&MAX('Table'[Column2]) ="medium",TRUE() )Then we can put the 'Table'[Column2] in the Fields , [Measure] in the Pre Selection , 'Dirty Table'[Dirty Status] in the Dirty Status, like below screenshot:
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
hi AkhilReddyN
you should use edit interactions in format tab for making a filter interact the other but as I know there is no way to make automatic selection in slicers (their nature is to be selected by user)
- AkhilReddyN2 years agoFrequent Visitor
Firstly thanks for your responce, is there any other way possible without using edit interactions. A different way would be helpful in my case.
Thank you