Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the code below which calculates the current year rolling sales and lasy year rolling sales. i'm not able to do the same for ytd calculation in the same code. i have filter of view with option of (rolling and ytd). if select rolling from the filter i can sales in text object with current year rolling sales and last year rolling sales. I want the same to be calculated for YTD.
Attaching you the QVW file and aslo the code for rolling calculation.
='Current Year:'& Num((Sum({<week = {">=$(vMinDate)<=$(vMaxdate)"}>} NET_SLS_AMT)/1000000),'##.00')
& ' Last Year:'&num((((Sum({<week = {">=$(vRollingStart)<=$(vRollingEnd)"},Period=>} NET_SLS_AMT)/1000000)
-
Sum({<week = {">=$(vRollingStart)<=$(vRollingEnd)"},Period= {'LYTD'}> } NET_SLS_AMT)/1000000)),'##.00')
Thanks
i'm posting the question right away
YTD:
sum({$<date={">=$(=yearstart(max(date)))<=$(=max(date))"},year=,month=,day=>}sales}
QTD;
sum({$<date={">=$(=quaterstart(max(date)))<=$(=max(date))"},year=,month=,day=>}sales}
same for MTD,WTD replace month start, week start in the place of year start..
please let me know if i am wrong..