March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I was trying to create a slicer based default selection on another slicer.
To tell it more clear I have country slicer and time aggregation slicer(MTD,YTD & MAT). If I select India ln country slicer by default MTD should be selected and I should be able to change another time aggregations as well.
Is there anyway to implement this.Any suggestions regarding this would be very helpful.
Thanks in advance
Solved! Go to Solution.
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
According to your description, you want to realize that when we select the first slicer then the second slicer show the the corresponding option.
First of all, for your needs, if we want to affect the choice of one slicer to affect the choice of another slicer, then we need these two fields to have a hierarchical relationship, and we can create a new table to define this hierarchical relationship.Then we can re-create the measure and the use the past measures to get the value we want .
Second, the default slicer in Power BI does not have the function of default selection, if you need to implement the default selection, you can try to use "Preselected slicer".
For more information, you can refer to :
Solved: How to set last 2 months as default filter in a po... - Microsoft Power BI Community
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 @v-yueyunzh-msft ,
I have gone through the approach and checked preselected slicer as well. Still I couldn't achieve the exact required result.
Please suggest some other alternative approaches if possible.
Thanks in advance.
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 @v-yueyunzh-msft ,
Thankyou for the reply and suggestion I will work on it. It is really very helpful.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |