Forum Discussion
Modifying a slicer
- 1 year ago
You would need to create a new table with 2 columns, 1 for the label you wanted in the slicer and 1 for the actual type. "Emergency or priority" would have 2 rows, one for each of the actual types. You could use DAX to create this
Slicer Table = SELECTCOLUMNS ( { ( "Emergency", "Emergency" ), ( "Priority", "Priority" ), ( "Routine", "Routine" ), ( "Emergency or Priority", "Emergency" ), ( "Emergency or Priority", "Priority" ) }, "Label Type", [Value1], "Actual Type", [Value2] )Link the actual type column to your main table in a many-to-many single direction relationship, so that the slicer table filters the main table. Use the slicer table in your slicer visual.
You can create an extended table with the Dim table values. Something like this.
The values in your Dim Table. Column2 will be your key.
Your Extended Dim Table can be created like this
I've added a new value (Emergency/Priority) to the table and assigned both key values (E11 and P11) to this.
Once you've created a relationship between these two dim tables, in your power bi canvas you need to bring the extended table as a slicer and it should work.
Hope this helps.