Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All
i have case where in i need to show the current sales and previous sales in the same table based on the selection user makes i had written an set analysis script as below
Current Sales =SUM({$<DATE={"$(vMaxdate)"}>}Sales)
PreSlaes = SUM({$<DATE *={"$(vPrevDate)"}>}Sales)
this works fine if i select the day but the previous sales values remains zero when the selection is on month
kindly suggest
Thanking You
Vinayagam
Try without *
PreSlaes = SUM({$<DATE ={"$(vPrevDate)"}>}Sales)
Try this way
Current Sales =SUM({$<DATE={'$(vMaxdate)'}>}Sales)
PreSlaes = SUM({$<DATE ={'$(vPrevDate)'}>}Sales)
Or
Current Sales =SUM({$<DATE={"$(vMaxdate)"}>}Sales)
PreSlaes = SUM({$<DATE ={"$(vPrevDate)"}>}Sales)
yup Sir even tried the same but still not working in case of the month
What are the expression in the vMaxdate and vPrevDate.
HI SIR
EXPRESSION AS BELOW
vMaxdate=MAX(DATE)
vMaxdate=DATE(AddMonths(Max(DATE),-1))
I guess the issue is beacuse of having multiple years of data. I Believe this will work only when you select an Year from your data.
Thanks
Try with this expressions and put YourMonthFieldHere= in both the expressions.
Current Sales =SUM({$<YourMonthFieldHere=, DATE={"$(vMaxdate)"}>}Sales)
PreSlaes = SUM({$<YourMonthFieldHere=, DATE ={"$(vPrevDate)"}>}Sales)
Eg:-
Current Sales =SUM({$<MonthField=, DATE={"$(vMaxdate)"}>}Sales)
PreSlaes = SUM({$<MonthField=, DATE ={"$(vPrevDate)"}>}Sales)