Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to show the number of units sold for last month using set analysis. My expression I have is below which I thought would work but doesn't.
Any help would be much appreciated.
sum({<UNIT.SOLD_MONTH = {"$(=month(addmonths(today),-1))"}>} UNIT.TOTALSOLD)
Thanks
Gareth
Use below expression
=SUM({<
UNIT.SOLD_MONTH= {"$(=Month(AddMonths(Today(),-1)))"},
UNIT.SOLD_YEAR= {"$(=Year(AddMonths(Today(),-1)))"}
>} UNIT.TOTALSOLD)
The above is assuming that UNIT.SOLD_MONTH is a field which is date field as well. I would check if that's true by checking if Num(UNIT.SOLD_MONTH) in a list box gives you number. If it does than Mayil and Pradeep's expression should work for you. Else fix the UNIT.SOLD_MONTH in the script
hi,
Try to take one separate field for month and use the same in the expression
Sum({< Month_field = {"$(=Month(AddMonths(Today(),-1)))"}>} UNIT.TOTALSOLD)
or
exp is like :
Sum({<UNIT.SOLD_MONTH = {"$(=Date(AddMonths(Today(),-1),'MMM-YY'))"}>} UNIT.TOTALSOLD)
Thank you so much for everyone's help and advice!
Thanks
Gareth