cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

Use Headers as slicer

Hi all,

 

I have data that looks like this (below) and I want to create a slicer that contains all names in the headers (pcusers, nonpcusers,andriodusers, iOSusers) I found some examples but they are not working for me. any suggestions on the best approach to do this?

 

thanks! 

 

datepcusersnonpcusersandroidusersiOSusers
11/15/20201%44%54%45%
11/16/20203%33%45%54%
11/17/20203%53%14%15%
11/18/20206%53%15%23%
11/19/20204%23%34%33%
11/20/20209%22%53%90%
11/21/20205%22%33%43%
11/22/20203%12%45%60%
1 ACCEPTED SOLUTION
Community Support
Community Support

Hi @FatBlackCat30 ,

 

Please check whether this could meet your requirements:

Use Headers as slicer.gif

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

View solution in original post

7 REPLIES 7
Community Support
Community Support

Hi @FatBlackCat30 ,

 

Please check whether this could meet your requirements:

Use Headers as slicer.gif

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

View solution in original post

thank you this is xactly what I was looking for 

Helper II
Helper II

@FatBlackCat30 

Hi, 

No worry, unpivoting does not cuase any data loss. actually this process (Unpivoting) is required for all pivoted tables to use Power BI efficiently. 

With Excel, we usually use(like) pivoted table, but power BI mostly uses unpivoted table.

Hence, if you will use Poer BI, I recommend to get familier with it.

 

Hope this helps. Thanks.

Helper II
Helper II

@FatBlackCat30 

Hi,

First, you need to Unpivot the the table (except Date header) as below;

1. Home > Transform Data

2. Select the data table and unpivot all heards except Date

solution1.png

 

 

 

 

 

 

 

 

 

 

 

 

3. Close and apply and Create Slicer

solution2.png

 

 

 

 

 

 

 

 

 

 

Hope this helps you.

Hi @colacan Is this possible without unpivoting? Sorry I should have clarified that

Unpivot the data in power query. Click the date column, then "unpivot other columns". This will give you and attribute column and a value column. You can use attribute in your slicer



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

@MattAllington is it possible to do this without unpivoting the data?

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors