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

Create a Prior Year Column Based on a Filter Value

So I am trying to create a visualization that will show the prior year amount for the same period in a different column based on my slicer. So slider is filtered for 2024_P02 this has a date associated in my calendar table of 2/1/2024. I want the current period to show up in the Amount Column. I do want the Same Period Last Year column to have the prior year for the same period. I tried using sameperiodlastyear function, but it didn't return anything.

drudd75077_0-1731627298517.png

 

My pbix file in a zip folder 

 

Let me know if you ahve any questions. I really can't figure this how most examples online show a table with dates as the row values which isn't the case here. The context is really what I select for my slicer.

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@drudd75077 , I check the file. Change your join to date from year_period  (for both tables)

 

amitchandak_0-1731647135293.png

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@drudd75077 , I check the file. Change your join to date from year_period  (for both tables)

 

amitchandak_0-1731647135293.png

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That worked, thank you!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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