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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
mvmania
Regular Visitor

Slicer by Column

Hi, I am very new to use Power BI. Thank you in advance for your answers.

I developed a table like below 

 

Project              Budget 2016               Budget 2017                  

Project1                1000                             1022

Project2                  1111                            1023

Project3               1112                               1032

...                             ...                                    ...

 

I would like to use slicer to show budget in 2016 and 2017 in one chart. In other words, if I click Budget 2016 in slicer, the chart shows information only based on data from column 'budget 2016', and if I click Budget 2017 in slicer, the chart shows that only based on data from column budget 2017.

Could you please let me know how? I am struggling with this for hours but to no avail.

Great thanks.

 

 

1 ACCEPTED SOLUTION
dkay84_PowerBI
Microsoft Employee
Microsoft Employee

Go to the query editor, highlight both 2016 and 2017 columns (shift + mouse click), then click "unpivot columns" in the Transform tab. This will give you 2 columns: budget and year. Notice how your rows for project number have doubled, with a row for 2016 and a row for 2017. Now you can create a chart with the budget field for the value, and add a slicer with budget year as field that will filter the chart.

View solution in original post

2 REPLIES 2
dkay84_PowerBI
Microsoft Employee
Microsoft Employee

Go to the query editor, highlight both 2016 and 2017 columns (shift + mouse click), then click "unpivot columns" in the Transform tab. This will give you 2 columns: budget and year. Notice how your rows for project number have doubled, with a row for 2016 and a row for 2017. Now you can create a chart with the budget field for the value, and add a slicer with budget year as field that will filter the chart.

Thank you very much for this simple and great solution.

You saved me!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors