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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Dynamic Year Measure

Jolly Day,

I currently have my visual set to just give me year 2021. I am wanting it to automatically update go two years back so I need it set to year 2022 when we begin year 2024. Is there a way to accomplish this? I created a year column that just parsed the year from my date so we also have the full date to work with. Any help with this would be greatly appreciated! 

IGotTheP0werBI_1-1676498163084.png

 

Thanks in advance,
Idon'tquitegotthepowerBI

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

try to do this

1 create a new measure

    Filter_DateTable_Year=IF(MAX(DateTable[Year])=YEAR(TODAY())-2,1,0)

2 add this measure to page filter, and filter the values equal to 1

View solution in original post

3 REPLIES 3
wdx223_Daniel
Super User
Super User

try to do this

1 create a new measure

    Filter_DateTable_Year=IF(MAX(DateTable[Year])=YEAR(TODAY())-2,1,0)

2 add this measure to page filter, and filter the values equal to 1

Anonymous
Not applicable

Thank you so much! Do you think you could break down how this is working?

it's like adding a column in the Date Table

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.