Reply
Till__
Helper I
Helper I

Individual Season Calendar if date is in range

Hi all, 

 

I want to split my finaincal year, which is going from 01.10.YYYY until 30.09.YYYY+1, into two different Seasons. To be more precise into "Summer 21/22" and "Winter 21/22".
The Code which gives me the finanical years like FY 21/22 works quite well.  

Financial Year =
VAR fy =
    IF (
        MONTH ( 'Calendar'[Date] ) <= 9,
        VALUE ( FORMAT ( 'Calendar'[Date], "YY" ) ) - 1,
        VALUE ( FORMAT ( 'Calendar'[Date], "YY" ) )
    )
RETURN
    CONCATENATE ( "FY", CONCATENATE ( fy, CONCATENATE ( "/", fy + 1 ) ) )


My Question is now, how do I split the Code to get also an additonal season parameter? That is I want to have it like this if the date is in the range 
FW 21 = 01.09.21 - 28.02.22
SS 22 = 01.03.22 - 31.08.22 
FW 22 = 01.09.22 - 28.02.23 
SS 23 = 01.03.23 - 31.08.23 
FW 23 = 01.09.23 - 28.02.24
 

Thank you in advance! 
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Till__ 

try like:

Season = 
VAR fy =
    IF (
        MONTH ( 'Calendar'[Date] ) <= 3,
        VALUE ( FORMAT ( 'Calendar'[Date], "YY" ) ) - 1 ,
        VALUE ( FORMAT ( 'Calendar'[Date], "YY" ) )
    )
VAR _season
IF (
    MONTH ( 'Calendar'[Date] ) >=3&& MONTH ( 'Calendar'[Date] )<=8,
    "SS ", "FW "
)
RETURN
_season&fy

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Till__ 

try like:

Season = 
VAR fy =
    IF (
        MONTH ( 'Calendar'[Date] ) <= 3,
        VALUE ( FORMAT ( 'Calendar'[Date], "YY" ) ) - 1 ,
        VALUE ( FORMAT ( 'Calendar'[Date], "YY" ) )
    )
VAR _season
IF (
    MONTH ( 'Calendar'[Date] ) >=3&& MONTH ( 'Calendar'[Date] )<=8,
    "SS ", "FW "
)
RETURN
_season&fy

Thank you! This perfectly works 🙂 
For me to work there is only one minor mistake as your code includes march but it should stop in feburary to be FW as written above but this is not important! 

 

MONTH ( 'Calendar'[Date] ) ‌‌< 3

 

 Thank you so much 🙂 

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)