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! Request now

Reply
jovendeluna21
Helper IV
Helper IV

Dynamic Comparable Spend based on Parameter Year Filter

Hi,

I have a 'Comparable' filter, and currently, I default the previous year calculation to -1. This means it defaults to 2023, but I want the comparable spend to be dynamic based on the selected fiscal year. For example, when I change to 2022, the current fiscal year number (which in my example is filtered to 2024) should be compared, meaning all the common Site PNs in 2022 and 2024 only. I tried to use 'Last N'[Var], but I am getting an error.

Can you help me with this? Thanks a lot.

 

jovendeluna21_0-1719818050017.png

 

jovendeluna21_1-1719818050121.png

 

I uploaded here the pbi file

https://drive.google.com/file/d/13mOcZwMqymf2cSguEtyEAHG74nnVwrpw/view?usp=sharing

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jovendeluna21, In case you need year by selection, you need a disconnected table to select the second year. Example

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

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

@jovendeluna21, In case you need year by selection, you need a disconnected table to select the second year. Example

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

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

Hi, @amitchandak , Thanks for your response, however, I find it hard with my file. Can you try to check? Thank you!

https://drive.google.com/file/d/13mOcZwMqymf2cSguEtyEAHG74nnVwrpw/view?usp=sharing

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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