Forum Discussion
How to set : always select the first value in button slicer
- 6 months ago
Alternatively, and if you dont need to other features the button slicers has, use Chiclet Slicer custom visual.
Hi VeeraBui
Using Tabular Editor, you can leverage a column's Group by Property property to "store a filter by using an alternate value, which represents the key of the entity." Power BI uses this key to store the filter, allowing the corresponding filter value in the visual to change dynamically.
In my example, I created a separate dimension table with DAX containing Product Key, Model and SKU then added a SKU rank within each model. This rank column will be used to identify each SKU. I had to create a different table as creating a calculated rank column in the original table would cause "composite key" error if changes are made to the model. I then created a one to many single direction relationship from the new table product key to the orignal table.
Modify the group by property in Tabular Editor as in the image below.
Power BI will use this column as a selection identifier and not the actual value selected. In the GIF below, you can see that I selected SKU BB-7421 which has rank of 1 and which many not exist in other Models but as I changed the Model, the selection automatically changed to rank 1 value within that newly selected Model.
Further reading can be found in the video description - https://youtu.be/MrEAZREQuXM
- danextian6 months ago
Super User
Alternatively, and if you dont need to other features the button slicers has, use Chiclet Slicer custom visual.
- VeeraBui6 months agoNew Member
Hello,
Thank you a lot.
The Chiclet Slicer works perfectly. I got stuck for a week and now I can solve this issue.
Have a nice weekend! 😉