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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
FatBlackCat30
Employee
Employee

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
Icey
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
Icey
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.

thank you this is xactly what I was looking for 

colacan
Resolver II
Resolver 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.

colacan
Resolver II
Resolver 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 an 8 times 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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