Forum Discussion
How to automatically update a single-select slicer when the segme changes
How can I have Team Manager targeting automatically select the first available value each time the Regional Manager is changed?
You can use the Pre-Selected slicer visual:
It is a little fiddly to use so I reccomend to use the Download Sample button and have a play on theirs.
You need to create a table using this script:
_PreselectedSlicer = DATATABLE("IsDirtySlicer1", BOOLEAN, "IsDirtySlicer2", BOOLEAN,{{FALSE(), FALSE()},{FALSE(), TRUE()},{TRUE(), FALSE()},{TRUE(), TRUE()}})Then create a measure to define which item is the TOP:
Top Town =var top1 =TOPN(1,ALLSELECTED(Town) --table with items to tick,[TownName] --calculation to sort using, DESC)RETURNSELECTEDVALUE(Town[TownName]) = MAXX(top1, [TownName])--If current row is equal to target item return TRUEUse these in the slicer like this:Hope this helps 🙂
4 Replies
- SamWiseOwl
Super User
You can use the Pre-Selected slicer visual:
It is a little fiddly to use so I reccomend to use the Download Sample button and have a play on theirs.
You need to create a table using this script:
_PreselectedSlicer = DATATABLE("IsDirtySlicer1", BOOLEAN, "IsDirtySlicer2", BOOLEAN,{{FALSE(), FALSE()},{FALSE(), TRUE()},{TRUE(), FALSE()},{TRUE(), TRUE()}})Then create a measure to define which item is the TOP:
Top Town =var top1 =TOPN(1,ALLSELECTED(Town) --table with items to tick,[TownName] --calculation to sort using, DESC)RETURNSELECTEDVALUE(Town[TownName]) = MAXX(top1, [TownName])--If current row is equal to target item return TRUEUse these in the slicer like this:Hope this helps 🙂
- v-sdhruv
Community Support
Hi Syndicate_Admin ,
Thanks for reaching out on Microsoft Fabric community forum.
I hope you were able to resolve the issue by the solution provided.
If you still need any help, feel free to reach out. - v-sdhruv
Community Support
Hi Syndicate_Admin ,
I hope your issue was addressed.
If you were able to resolve the issue, pleas Acccept it as a solution or give Kudos so that other users can benefit from it.
Thank You - v-sdhruv
Community Support
Hi Syndicate_Admin ,
I hope your issue was addressed.
If you were able to resolve the issue, please Acccept it as a solution or give Kudos so that other users can benefit from it.
Thank You