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.
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.