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
Benji_964
New Member

Adding a seasons column to dates table based on month dates

Hi everyone,

 

I'm relatively new to PowerBI but thanks to this site my first reports are already working great.

Unfortunatly I couldn`t find any solution for this minor problem...

 

I'm generating my dates table like this:

 

Dates Table.png

 

Now I would like to add a Column that shows the coresponding "Season"

 

Seasons are starting on July, 01 every year and ending on June, 30 the year after

 

So for example:

July, 01 2017 - June, 30 2018 = Season 2017-2018

July, 01 2018 - June, 30 2019 = Season 2018-2019

July, 01 2019 - June, 30 2020 = Season 2019-2020

 

Thanks in advance for any help

 

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

HI @Benji_964 ,

 

Try and create a Calculated Column.

 

Season Year =
VAR _season =
    IF (
        MONTH ( 'Dates'[Dates] ) <= 7,
        VALUE ( FORMAT ( 'Dates'[Dates], "YYYY" ) ),
        VALUE ( FORMAT ( 'Dates'[Dates], "YYYY" ) ) - 1
    )
RETURN
    CONCATENATE ( "SEASON", CONCATENATE ( _season, CONCATENATE ( "/", _season + 1 ) ) )

 

 

Regards,

Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

HI @Benji_964 ,

 

Try and create a Calculated Column.

 

Season Year =
VAR _season =
    IF (
        MONTH ( 'Dates'[Dates] ) <= 7,
        VALUE ( FORMAT ( 'Dates'[Dates], "YYYY" ) ),
        VALUE ( FORMAT ( 'Dates'[Dates], "YYYY" ) ) - 1
    )
RETURN
    CONCATENATE ( "SEASON", CONCATENATE ( _season, CONCATENATE ( "/", _season + 1 ) ) )

 

 

Regards,

Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Hi @harshnathani,

 

thank you for your help and the fast reply.

Your solution workes grate!

 

Had to make only some minor changes.

"<=6" instead of "<=7" and put the "-1" after the first instead of the second value.

 

Here my solution:

 

Brennjahr = 
VAR _season =
    IF (
        MONTH ( 'Datumstabelle'[Date] ) <= 6,
        VALUE ( FORMAT ( 'Datumstabelle'[Date], "YYYY" ) ) -1,
        VALUE ( FORMAT ( 'Datumstabelle'[Date], "YYYY" ) )
    )
RETURN
    CONCATENATE ( _season, CONCATENATE ( "-", _season + 1 ) ) 

 

Thank you very 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.