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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
arashaga
Helper I
Helper I

Issue with Slicing data based on the columns

Hi I have a table as below. I would like to know how to use the slicer in such a way that when I pick Year 1, it would give me a barchart with ony Year1_Median, Year1_P25 and Year1_P75 and when I pick Year 5 from the slicer it would give me allthe measures for Year5 in the bar chart(lkie below). I know I may have to restructure the data but I need to know what would be the best appraoch.

Capture.PNG

Here is the table:

inst_nameYear1_MedianYear1_P25Year1_P75Year5_MedianYear5_P25Year5_P75
abc616915157869881624274839571718
abc678406027574638762836066289644
abc   755045176785939
abc5457750854116518   
abc431743894544991623075412274470
abc522724203054537597184839992076
cda      
cda   597934903568015
cda435823531047482518274274356783
wad   609485173075345
wad441744128946312   
wad511384870161766   
wad412713505345585615556008576922
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try unpivoting your table through the "Query Editor". 

 

1. Edit table

2. Select column name "inst_name" and right click on the column header

3. Select "Unpivot Other Columns"

 

You'll get an "attribute" Column which will contain values such as your column headers (Year1_Median, Year1_P25, Year1_P75 etc.) and then a "Value" Column which will be the corresponding dollar amount.

 

Hopefully that helps!

Derek G

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Try unpivoting your table through the "Query Editor". 

 

1. Edit table

2. Select column name "inst_name" and right click on the column header

3. Select "Unpivot Other Columns"

 

You'll get an "attribute" Column which will contain values such as your column headers (Year1_Median, Year1_P25, Year1_P75 etc.) and then a "Value" Column which will be the corresponding dollar amount.

 

Hopefully that helps!

Derek G

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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