Forum Discussion
Create Different Date bands
- 4 years ago
SpiroswayGR , You have create a new column in date table
Switch(True(),
[Date] >= date(2021,07,01) && [Date] <= date(2022,1,31) , "Jul 2021 to Jan 2022",
[Date] >= date(2022,02,01) && [Date] <= date(2022,3,31) , " Feb - Mar 2022",
format([Date], "mmm-yyyy")
amitchandak I love that you are in my mind !!
Quick question for sorting, is it an easy way to sort it according to months?
I made ID columns like the calculate column but it doesn't work when I reach on months. Should we change the format?
DateBandID =
Switch(True(),
[Date] >= date(2021,07,01) && [Date] <= date(2022,1,31) , "1",
[Date] >= date(2022,02,01) && [Date] <= date(2022,3,31) , " 2",
format([Date], "mmm-yyyy")
I found a problem in solution,
I have 2 calendars that are connected with data, one normal calendar that is connected with the system date, and 2nd one which connected with the system date.
So, I can create different System Date bands for Season 2022 (Stay Date) but when I select Season 2021, I am getting totally wrong results. Because it calculates the System date that I had created instead of creating the same dates 1 year ago.