Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
abgnfirdaus
Helper I
Helper I

multiple column in one slicer

Hello there, I have a question. Let say the table is:

EquipmentVoltageRed cableBlue cableYellow cable
TRU 16.6kV0.230.450.65
TRU 26.6kV0.320.50.7
TRU 36.6kV0.40.560.75

Then, I want to put 3 columns in one slicer, show list of :
Slicer :

  • Red cable
  • Yellow cable
  • Blue cable

    Then, when I click Red cable, the data in Red cable will display on line chart. Then, If I click yellow cable, then the line chart will display yellow cable data only. Same as blue cable also.

    Hope you can help me. thank you in advance.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

1.PNG

Then you could create slicer and line chart as below.

2.PNG

 

Best Regards,

Jay

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

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.

1.PNG

Then you could create slicer and line chart as below.

2.PNG

 

Best Regards,

Jay

Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, select the first 2 columns, right click and click on "Unpivot Other columns".  Now build your slicer/visual.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

Is there any other way without using external tools? 

I think your solution is filtering the data inside column. I dont want filter the data inside column. i want to put all three column inside 1 slicer. Then, when I click one of the column from the slicer, it will only show the data from the column that I clicked only. In my case, the data will display on line chart. For example. if I clicked column 1, then it will show only data from column 1, then if I clicked the data from column 2, it will only show data from column 2. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors