Forum Discussion

CMoppet's avatar
CMoppet
Helper IV
1 year ago
Solved

Slicer that Covers Multiple Columns

I have a table called 'WO Raw Data' that contains rows of machine breakdown data.  Each row contains up to four faults, spread over 4 columns. I am trying to add a slicer to bar chart where the user...
  • bhanu_gautam's avatar
    1 year ago

    CMoppet , You need to create a measure that will count the rows where the selected fault appears in any of the four columns. 

     

    FaultCount =
    CALCULATE(
    COUNTROWS('WO Raw Data'),
    FILTER(
    'WO Raw Data',
    'WO Raw Data'[Fault Analysis Task2 Level2.2] IN VALUES(AllFaults[Fault]) ||
    'WO Raw Data'[First Fault Level 2.2] IN VALUES(AllFaults[Fault]) ||
    'WO Raw Data'[Fault Analysis Task3 Level2.2] IN VALUES(AllFaults[Fault]) ||
    'WO Raw Data'[Fault Analysis Task4 Level2.2] IN VALUES(AllFaults[Fault])
    )
    )

     

    Add your bar chart visualization.
    Use the FaultCount measure as the value for the bar chart.
    Add the AllFaults[Fault] column to the slicer.