Forum Discussion

RichFlorida's avatar
RichFlorida
Helper V
1 year ago
Solved

Modifying a slicer

  I have a single-select slicer based on a column in a table. The column has three values: Emergency, Priotity and Routine, see image below.     Is there a way to use DAX to add a 4th optio...
  • johnt75's avatar
    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.