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