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
Chrishurcombe
Regular Visitor

Slicer using excel column headers

I have a line chart with multiple daily market price date (X axis), for example, daily crude oil price and GBP/EUR tracking against the date (Y axis). 

 

As the chart contains a lot of data it looks crowded, and I am looking for a way to use the headers as the slicers,  For example, select crude oil and compare this to another measure over a given time frame. 

 

Date slicers are working fine, but how can I use a slicer to choose what data I only want to view.

 

Data is updated daily and is built in an excel table.

 

Was hoping a new table containing the column headers would be a simple fix, but not worked.

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @Chrishurcombe,

 

If I understand you correctly, you can use Unpivot Columns option in Query Editor(which turns multiple column headers into a single column but in rows. and store their values in another column) to unpivot your crude oil price and GBP/EUR column first, then you can use the Attribute(Header Name) column as Legend , Value column as Value on the Line Chart, and then use Attribute(Header Name) column as a Slicer to choose what data you want to view. For more details about how to Unpivot Columns in Power BI Desktop, you can refer to this article. Smiley Happy

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @Chrishurcombe,

 

If I understand you correctly, you can use Unpivot Columns option in Query Editor(which turns multiple column headers into a single column but in rows. and store their values in another column) to unpivot your crude oil price and GBP/EUR column first, then you can use the Attribute(Header Name) column as Legend , Value column as Value on the Line Chart, and then use Attribute(Header Name) column as a Slicer to choose what data you want to view. For more details about how to Unpivot Columns in Power BI Desktop, you can refer to this article. Smiley Happy

 

Regards

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.

Top Solution Authors