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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Anonymous
Not applicable

Season column in date table

Hi,

 

I've created a Date table using DAX that has columns for Date, Year, Month and Day. 

 

I want to create a new column called "Winter" that will have values as either:

 

- "Southern Hemisphere" for May - September

- "Nothern Hemisphere" for November - March

- "Not Winter" for April and October

 

Can someplease please help with the DAX?

 

Best,

Soph

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hi @Anonymous 

Give this a try.

 

Winter = SWITCH(
    TRUE(),
    MONTH(Dates[Date]) IN {5,6,7,8,9}, "Southern Hemisphere",
    MONTH(Dates[Date]) IN {11,12,1,2,3}, "Northern Hemisphere",
    "Not Winter"
)

You would add this as a calculated column to your Dates table.

 

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

Hi @Anonymous 

Give this a try.

 

Winter = SWITCH(
    TRUE(),
    MONTH(Dates[Date]) IN {5,6,7,8,9}, "Southern Hemisphere",
    MONTH(Dates[Date]) IN {11,12,1,2,3}, "Northern Hemisphere",
    "Not Winter"
)

You would add this as a calculated column to your Dates table.

 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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