Peroidtodatesum does not include end date?

Hi I’m trying to set up YTD calculation.


When I set up date to:

I found out there is a discrepancy and this seems like this is due to last day missing:


Is this normal - when I put YTD set date the logic is date <set date not date <=set date?
or am I missing something?


1 Like

Hi @Liz, the discrepancy is because QS is taking the date 2022/05/31 as begining of the date, therefore, the YTDsum gives you data to the 2022/05/31 00:00:00, leaving the line for 2022/05/31 blank.
You can set the date to 06/01 or add one day to your formula.

Initially that’s what I thought so I have added truncdate to my date formula - would that not fix the issue?


Hi @emilyzhu adding another date works for YTDsum but what about weekly sums or monthly sums? Adding a day to the last date of the week/month rolls the week/month to the next period! Currently trying to solve this issue by adding 23 hours and 59 minutes to the time. Would love to know if there’s a better solution! Thanks

Glad that it’s not only me that has this issue - if it doesn’t include the last day, I wish it was made clear but I’m not even sure if this is intended or not.