Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please find the attached application,
Assumptions: suppose current month is April.
Problem: I need to write two expressions, First Expression will find the total amount of last month (i.e: March=1350 ) and the second expression will find the total of last three months (i.e:Feb=990,+ Mar=1350, + April=950; Total of last three months= 3290,Note : Last three months includes current month as well
Regards
Zain.
Check the above qvw file again,but its better to use date field
PFA
thanks for the solution,
Last three months still not working well if you notice, the second expression for last three months will give last four month's data .
Check the above qvw file again,but its better to use date field
Thanks for the advice & solution .
Hi Zain,
First, create a new field MONTHNUM containing month in numeric value with applymap.
Then, use variables to get appropriate month value:
_currentMonth=MONTHNUM
_previousMonth=_currentMonth-1
_previous3Month=currentMonth-3
Create expressions using thoses variables:
For last month:
Sum({$<MONTHNUM={'$(_previousMonth)'}>}AMOUNT)
For last 3 months:
Sum({$<MONTHNUM={'>=$(_previous3Month)<=$(_currentMonth)'}>}AMOUNT)
Hope it's usefull
Regards
Vincent