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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
adharia
Frequent Visitor

Can we use multiple columns as a source of input for a slicer?

Hi, 

 

I have an employee database which consists information about his department, project name, Location from where he is working, number of hours worked in particular month(January, February, March....). I want to create a slicer for the months section where by just selecting the month, I would come to know how many hours an employee has worked in that month. But the main issue comes when I try to drag the data to "Field" section it allows me to add only one column(i.e. only April or May or June...). Can anyone help me with creating a slicer?  Below is the sample data set. Sample.PNG

 

I want to create a slicer(Output) like Output.PNG

1 ACCEPTED SOLUTION
adharia
Frequent Visitor

Thankyou for the solution @fhill it worked out for me.

View solution in original post

3 REPLIES 3
fhill
Resident Rockstar
Resident Rockstar

The data sample you provided is already in a Pivot or Matrix layout.  If you highlight ONLY your months columns when in Query Editor in Power BI. you can choose 'Unpivot Columns' under the 'Transform' tab.  This will turn you data into something closer to my 2nd screen shot below.

 

Once you have the data in a Data Detail Level format, you can now easily choose 'Attribute' (or whatever you choose to rename this column after the un-pivot) as a slicer.

 

Thank You,

FOrrest

 

 

(Data in Pivot or Matrix format)

Capture.PNG

 

(Data Un-Pivoted in Raw Detail Level)

Capture2.PNG

(Now you can create a slicer like normal.)

Capture3.PNG




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Anonymous
Not applicable

Hi @fhill Your solution worked on this case since data set was months. In my problome i have category like Country, Job Title and not the months. Can you help me solve my issue. I have posted here my issue:

 

https://community.powerbi.com/t5/Desktop/Slicer-by-columns-name/m-p/472373/highlight/true#M219544

 

THanks in advance

adharia
Frequent Visitor

Thankyou for the solution @fhill it worked out for me.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.