Given a column of dates, how can I calculate if the date is a MTD / QTD or YTD ?
@Mario36Hi! It would have really really helped had you provided that data initially - or the other time I asked for clarification on what you were looking for.
It's fairly straight-forward change from the previous workflow - so here's the updated version. You can add in the static columns ("MTD",QTD") as you wish.
You need two columns of date - no?
For mtd datetimediff([date],[date2],"months")<1 (less than 1 month)
For qtd floor(datetimediff([date],[date2],"months")/3)<1 (less than 3 months)
for ytd datetimediff([date],[date2],"years")<1 (less than 1 year)
Do you mind sharing a workflow please. This is how I wish to see the data populate