Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm a little embarrassed to be asking, but I'm having some issues creating a year to date sum using Set Expression.
I have a field Amount that I would like to do a YTD sum, with dates ranging from 01/2021 to 12/2021 called FinPeriod. I've been scratching my head all afternoon trying to come up with the expression and it's just not coming together, could someone please point me in the right direction?
Cheers
Duals are a bit tricky when it comes to set analysis.
Try this (Dynamicly based on max(FinPeriod)):
=Sum({<FinPeriod = {">=$(=Date(Yearstart(max(FinPeriod),0,7), 'MM/YYYY'))<=$(=maxstring(FinPeriod))"}>} Amount)
or this (Staticly based on today()):
=Sum({<FinPeriod = {">=$(=Date(Yearstart(today(),0,7), 'MM/YYYY'))<=$(=date(today(), 'MM/YYYY')) "}>} Amount)
See attached qvf file.