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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
EpicTriffid
Helper IV
Helper IV

Filter date by most recent non-blank year backwards

Hi all,

 

So we a situations where our most recent KPI scores are released on different years. One KPI might have its most recent score in 2019, while another might have its most recent score in 2017. I need to show 3 years of data, much like the picture below:

 

Capture.PNG

 

Here, the most recent figures has been released in 2019, so we get three year rolling backwards. We can call this KPI X.

 

In the picture below, KPI Y's most recent figure is from 2018. We have 2016 data, but the year column is stuck on 2017-2019:

 

Capture1.PNG

Is it possible to make it so that the year filter is dynamic, and adjusts to show the most year of data on the right, followed by the preceding two years of data?

 

Cheers!

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@EpicTriffid 

 

You may refer to the post below to add a calculated column.

https://community.powerbi.com/t5/Desktop/Calculate-Sales-first-year-second-year-etc/m-p/451157#M2089...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chuncz-msft 

 

I dont quite understand this. Could you please explain in a bit more detail?

Im sorry, I dont quite understand how that formula works? Could you please explain what it's doing?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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