Forum Discussion
How to set : always select the first value in button slicer
Can someone help me to check this dashboard: Microsoft Power BI
One artist can have multiple tracks. I want to set: whenever user selects an artist in the top slicer, the bottom button slicer select the first track of that artist by default ( like in the above dashboard)
I can not do it when I try to make my own dashboard. Whenever I choose a new artist, there is no track selected and I need to click to select.
I want the first track to be selected by default when I choose an artist. How can I do that ?
Thank you a lot.
Alternatively, and if you dont need to other features the button slicers has, use Chiclet Slicer custom visual.
5 Replies
- renyusenFrequent Visitor
try this, make sure the "force selection" is turn on
- VeeraBuiNew MemberYes, I have chosen that "force selection" in the button slicer, but when I choose the new artist in the top slicer, there is no automatic selection in the button slicer. I need to click to choose.
- danextian
Super User
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