Forum Discussion

Conodon's avatar
Conodon
Frequent Visitor
4 years ago
Solved

Seasonal Date Ranges (1 Sep - 30 April every year)

Hi all,   I have a dataset that contains outcomes that occur seasonally between 1 September and 30 April (inclusive) every year since 2019 and will continue every year going forward. I am wondering...
  • Conodon's avatar
    4 years ago

    I think I have figured this out by creating a column with the following DAX formula 

     

    Seasonal = SWITCH(TRUE(),Dates[Date] >= DATE(2019,09,01) && Dates[Date] <= DATE(2020,04,30),"Season 19-20",Dates[Date] >= DATE(2020,09,01) && Dates[Date] <= DATE(2021,04,30),"Season 20-21",Dates[Date] >= DATE(2021,09,01) && Dates[Date] <= DATE(2022,04,30),"Season 21-22",Dates[Date] >= DATE(2022,09,01) && Dates[Date] <= DATE(2023,04,30),"Season 22-23",Dates[Date] >= DATE(2023,09,01) && Dates[Date] <= DATE(2024,04,30),"Season 23-24","Not in season")