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.
Hi RichFlorida
Thank you for reaching out on the Microsoft Community Forum.
To achieve this, we have created sample data with the following DAX query:
FilterLogic =
SWITCH (
SELECTEDVALUE(SlicerTable[Selection]),
"Emergency", FILTER(SlicerTable1, SlicerTable1[Selection] = "Emergency"),
"Priority", FILTER(SlicerTable1, SlicerTable1[Selection] = "Priority"),
"Routine", FILTER(SlicerTable1, SlicerTable1[Selection] = "Routine"),
"Emergency + Priority",
FILTER(SlicerTable1, SlicerTable1[Selection] IN {"Emergency", "Priority"})
)
Additionally, I'm sharing the screenshot and PBIX file of the output.
If this meets your requirements, please "Accept as a solution." Otherwise, please explain your scenario
Thanks,
Pavan.