Forum Discussion
Slicer based default selection on another slicer
- 3 years ago
Hi , kompalli
Thanks for your quick response. In my understand you can refer to this:
I create a table like this:This means when we select the "a", we can just select the "4,5,6" and for your need , it will be selected by the "4" by defalut.
(1)We need to create a table like this:
(2)Then we create a measure:
Flag = var _product = SELECTEDVALUE('Table'[Product]) var _cur_month =FILTER(ALL('Table') , [Product] = _product) var _min_month = MINX(_cur_month , [Month]) var _slicer =SELECTEDVALUE('Table'[Month]) return IF( ISFILTERED('Table'[Product]) && _slicer = _min_month ,TRUE(),FALSE())(3)Then we put the 'Table'[Product] in system slicer and put the other filed in the "Preselected slicer":
(4)Then we can get the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , kompalli
Thanks for your quick response. In my understand you can refer to this:
I create a table like this:
This means when we select the "a", we can just select the "4,5,6" and for your need , it will be selected by the "4" by defalut.
(1)We need to create a table like this:
(2)Then we create a measure:
Flag =
var _product = SELECTEDVALUE('Table'[Product])
var _cur_month =FILTER(ALL('Table') , [Product] = _product)
var _min_month = MINX(_cur_month , [Month])
var _slicer =SELECTEDVALUE('Table'[Month])
return
IF( ISFILTERED('Table'[Product]) && _slicer = _min_month ,TRUE(),FALSE())
(3)Then we put the 'Table'[Product] in system slicer and put the other filed in the "Preselected slicer":
(4)Then we can get the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
v-yueyunzh-msft
I am trying the same solution, but when I select other products - say b,c,d, the default value isn't getting selected.
Can you please let me know what needs to be done?