Forum Discussion
Grouping Dates
Hi Anonymous
Try to SWITCH, it will stop execute after first succesfull conditionand will help you to resolve overlapping issue
DateGroup = SWITCH(TRUE(),
DATESBETWEEN([Date], DATE(2019,10,1), DATE(2019,10,22)), "A",
DATESBETWEEN([Date], DATE(2019,10,8), DATE(2019,10,29)), "B",
DATESBETWEEN([Date], DATE(2019,10,15), DATE(2019,11,5)), "C",
"Undefined"
)
do not hesitate to give a kudo to useful posts and mark solutions as solution
- az386 years ago
Community Champion
Sorry, Anonymous
I gave you completely wrong statement
try
DateGroup = SWITCH(TRUE(), [Date] >= DATE(2019,10,1) && [Date] <= DATE(2019,10,22)), "A", [Date] >= DATE(2019,10,8) && [Date] <= DATE(2019,10,29)), "B", [Date] >= DATE(2019,10,15) && [Date] <= DATE(2019,11,5)), "C", "Undefined" )do not hesitate to give a kudo to useful posts and mark solutions as solution
- Anonymous6 years agoNot applicable
hi az38 Anonymous
let say date is 2019/10/16.
this date comes in all buckets but as per column it will always show "A" only. The first condtion of switch statement get satisfied and it will not check for next conditions.
Anonymous if you want the same solution then above solution will work.
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.