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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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 🙂 

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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