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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Create slicer based on multiple column headers

Hi everyone,

 

Is it possible to create one slicer including several column headers (without unpivoting those columns)? 

For example, if there are four headers, and you want to easily switch between those columns, how can that be done?

 

NPSCESJoyGeneral
86.57.86
76.887
7.7797
668.56.2
7968
4 REPLIES 4
Anonymous
Not applicable

Hi @v-xicai ,

 

Thanks for your reply.

At the end, I did unpivot the columns. So, the issue is solved. 

v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create a new table via button "Enter data", which contains the column names NPS,  CES,  Joy and General, assuming this new column is named [Column header]. Then create a calculated column to as the source of slicer visual.

 

SelectedColumn=

Var d= SELECTEDVALUE(Table[Column header])

Return

SWITCH(d, "NPS", 'Data'[NPS], "CES", 'Data'[CES], "Joy", 'Data'[Joy], "General", 'Data'[General] )

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xicai I am trying to do this in my file and its not working. Do you happen to have a sample file with this example?

amitchandak
Super User
Super User

@Anonymous , refer if this can help

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.