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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors