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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Custom Year column between dates

Hi, 

I need to create a custom Year column based on between dates

 

Between

01/09/2014 and 31/08/2015 then 14/15 else

01/09/2015 and 31/08/2016 then 15/16 else

01/09/2016 and 31/08/2017 then 16/17 else

01/09/2017 and 31/08/2018 then 17/18 else

01/09/2018 and 31/08/2019 then 18/19 else

01/09/2019 and 31/08/2020 then 19/20 else

01/09/2020 and 31/08/2021 then 20/21 else

01/09/2021 and 31/08/2022 then 21/22 else

01/09/2022 and 31/08/2023 then 22/23 else

 

any idea what the correct syntax to use on this would be, please?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a new column like

 

if(month([Date]) >=9 , format([Date], "YY") & "" & ((format([Date], "YY")*1)+1) ,((format([Date], "YY")*1)-1) & "" & format([Date], "YY") )

 

https://medium.com/chandakamit/cheat-sheet-calendar-of-any-standard-month-just-one-variable-apart-5e...

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

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try a new column like

 

if(month([Date]) >=9 , format([Date], "YY") & "" & ((format([Date], "YY")*1)+1) ,((format([Date], "YY")*1)-1) & "" & format([Date], "YY") )

 

https://medium.com/chandakamit/cheat-sheet-calendar-of-any-standard-month-just-one-variable-apart-5e...

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.