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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
souvik900766
Helper IV
Helper IV

Show Year of Previous to Previous Year from the current selected year

Hi ,

I want display the Previous to Previous Year from the current selected year.
For e.g.:-
if my current selected year is 2020 then it should display 2018.
for 1 prior yaer it is working like selectedvalue(year)-1 but If i am doing selectedvalue(year)-2 it is giving the result of PY i.e selectedvalue(year)-1

Thanks in advance !


1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @souvik900766 

 

That 

PPY = SELECTEDVALUE('Table (2)'[Year])-2
should work well to find the 2 years before the selected date.
 VahidDM_1-1630570234518.gif

 

 What is the type of your Year column? can you share a sample of your data here (Not a screenshot)?
 

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

Appreciate your Kudos VahidDM_0-1630570222805.png !!

View solution in original post

1 REPLY 1
VahidDM
Super User
Super User

Hi @souvik900766 

 

That 

PPY = SELECTEDVALUE('Table (2)'[Year])-2
should work well to find the 2 years before the selected date.
 VahidDM_1-1630570234518.gif

 

 What is the type of your Year column? can you share a sample of your data here (Not a screenshot)?
 

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

Appreciate your Kudos VahidDM_0-1630570222805.png !!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors