Forum Discussion
Dynamic Slicer
- 1 year ago
Power BI does not have the built-in ability to automatically deselect previous slicer selections as Tableau does, so manual deselection will still be necessary in the second slicer unless you use visuals and dynamic measures to display the output based on user selection.
You can create a mpping table that links the categories with the default item you'd like to select from the second slicer and and create a relationship between the first slicer’s table (Category) and the mapping table (Category).
Then create a measure :
SelectedItem = VAR SelectedCategory = SELECTEDVALUE(CategoryTable[Category]) RETURN CALCULATE( FIRSTNONBLANK(MappingTable[Default Item], 1), MappingTable[Category] = SelectedCategory )While this doesn't "force" the second slicer to automatically select items, it dynamically updates a visual with the first item corresponding to the category selection. Users can then interact with the second slicer as needed for finer control.
Hello jo123456 ,
There is no direct method but we can do some trick like below :
1. Considering you have 2 tables , one for items with values like apple, grape,broccoli etc and another for item category with values like Fruits, Vegitables and Nuts
2. Add a custom column Category in first table "Items" with below dax
Power BI doesn't natively allow for slicer values to be automatically selected. However, with this measure (First Selection), you can display the default first value in a card or other visual, and guide users accordingly.
Alternatively, you can set up custom bookmarks and sync slicers to automatically reset them when certain conditions are met (like changing the first slicer), though this is more of a manual process than an automatic selection based on a DAX formula.
You can do formatting as per need. I hope this helps.
Did I answer your query ? If Yes , please mark this as solution.
Cheera