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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors