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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
UK_User123456
Resolver I
Resolver I

Automatic Financial year recognition

Hi All,

 

Is there a DAX formula or a way around to automatically update all the datasets based on the current finanacial year and the previous 2 fy's? so for example when 20/21 comes around, my graphs will automatically update with 18/19, 19/20, 20/21 rather than me having to go in and manually changing the dates in the filter for each graph?

 

TIA

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @UK_User123456 ,

 

We can create a calculated column and filter by it to work around.

inlast 2 years = 
VAR thisyear =
    YEAR ( TODAY () )
RETURN
    IF (
        YEAR ( 'Table'[date] ) <= thisyear
            && YEAR ( 'Table'[date] ) >= thisyear - 1,
        "in last 2 years",
        BLANK ()
    )

Capture.PNG

2.PNG

Pbix as attached.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You may refer to my solution to a similar problem here - Flex a Pivot Table to show data for x months ended a certain user defined month.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-frfei-msft
Community Support
Community Support

Hi @UK_User123456 ,

 

We can create a calculated column and filter by it to work around.

inlast 2 years = 
VAR thisyear =
    YEAR ( TODAY () )
RETURN
    IF (
        YEAR ( 'Table'[date] ) <= thisyear
            && YEAR ( 'Table'[date] ) >= thisyear - 1,
        "in last 2 years",
        BLANK ()
    )

Capture.PNG

2.PNG

Pbix as attached.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
v-frfei-msft
Community Support
Community Support

Hi @UK_User123456 ,

 

Does page level filter or report level filer work in your scenario? Please refer to the online document as below.

https://docs.microsoft.com/en-us/power-bi/power-bi-report-add-filter#targetText=Open%20the%20Visuali...

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.