Forum Discussion

abgnfirdaus's avatar
abgnfirdaus
Icon for Helper I rankHelper I
4 years ago
Solved

multiple column in one slicer

Hello there, I have a question. Let say the table is: Equipment Voltage Red cable Blue cable Yellow cable TRU 1 6.6kV 0.23 0.45 0.65 TRU 2 6.6kV 0.32 0.5 0.7 TRU 3 6.6kV 0....
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi abgnfirdaus ,

     

    It is not supported to use column header as slicer and use DAX to get column header.

    You could try following methods.

    1# Open Query Editor, select these 3 columns and use Unpivot Columns feature.

    2# Create a calculated table by using below formula:

    Table 2 = UNION(
                SELECTCOLUMNS('Table 1',"equipment",'Table 1'[Equipment],"voltage",'Table 1'[Voltage],"cable","red cable","value",'Table 1'[Red cable]),
                SELECTCOLUMNS('Table 1',"equipment",'Table 1'[Equipment],"voltage",'Table 1'[Voltage],"cable","yellow cable","value",'Table 1'[yellow cable]),
                SELECTCOLUMNS('Table 1',"equipment",'Table 1'[Equipment],"voltage",'Table 1'[Voltage],"cable","blue cable","value",'Table 1'[blue cable])
                    )

    You will get a new table like below by using above methods.

    Then you could create slicer and line chart as below.

     

    Best Regards,

    Jay