Forum Discussion
WJ876400
6 years agoHelper IV
If Statement With Dates
Hi I have the below dates and want to group them togerther in Terms. So if a date is between September and December it is Term 1, between January-April is Term 2, May-August is Term 3. I am looki...
- 6 years ago
Hi,
You could achieve this by using MONTH in a SWITCH function like below
Term = SWITCH(TRUE(), MONTH('Table'[Date]) >=1 && MONTH('Table'[Date]) <=4,"Term 2", MONTH('Table'[Date]) >=5 && MONTH('Table'[Date]) <=8,"Term 3", MONTH('Table'[Date]) >=9 && MONTH('Table'[Date]) <=12,"Term 1")
Gordonlilj
6 years agoSolution Sage
Hi,
You could achieve this by using MONTH in a SWITCH function like below
Term =
SWITCH(TRUE(),
MONTH('Table'[Date]) >=1 && MONTH('Table'[Date]) <=4,"Term 2",
MONTH('Table'[Date]) >=5 && MONTH('Table'[Date]) <=8,"Term 3",
MONTH('Table'[Date]) >=9 && MONTH('Table'[Date]) <=12,"Term 1")