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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
cmajewsk
Helper I
Helper I

How to create slicer/button for different years?

I have a spreadsheet with projects that have budgets over multiple years.

Example:

Project Name2022202320242025
Project 110,00015,00010,000 
Project 225,000 15,00010,000

How can I create some buttons for the years i.e. 2022, 2023, etc. and when I click on a particular year button it will popultate the table with only the projects that have budget in that specific year?

 

Thanks for all your help!

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@cmajewsk , you can unpivot the columns in Power Query editor,

Arul_1-1663912341158.png

 

 

Arul_0-1663912281151.png

then year as a slicer,

Arul_2-1663912378254.png

Thanks,

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

5 REPLIES 5
cmajewsk
Helper I
Helper I

Quick question on this. I added a new column to my data source. And when I add info into all the cells of the new column is it missing in the data model for a lot of them. Do I need to un-pivot and repivot with the new column added? How can the data in this new column to show up in all the cells of the data model? 

cmajewsk
Helper I
Helper I

I see Unpivoted Columns in the Applied Steps, but then what are you doing with the Renamed Columns? What columns are you renaming?? Is it the Attribute Column?

If you unpivot the columns "by default" column names will be
1. Attribute->Year
2. Value->Budget

I just renamed it to provide a meaningful name. So, it is easy for you to identify the column.

 

Thanks,

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Thanks for all your help! I see if add rows into the souce data PBI just takes care of the entries for each year. Again thank you.

Arul
Super User
Super User

@cmajewsk , you can unpivot the columns in Power Query editor,

Arul_1-1663912341158.png

 

 

Arul_0-1663912281151.png

then year as a slicer,

Arul_2-1663912378254.png

Thanks,

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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