Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please can somebody explain the difference between the following two statements:
I tried to use a variable to calculate the previous months sales (based on MONTH Number.
However the following expression is bringing back ALL MONTHS before the current month....
sum({<CalendarMonthName =, CalendarMonthNumber = {'<= $(=v_Previous_Month)'}>} Sales)
So after trial and error this expression works........ (brings back only the previous month)
Sum({<CalendarMonthName=, CalendarMonthNumber={'$(v_Previous_Month)'}>} Sales)
Does anybody have an insight into the difference between the above expressions?
In the first expression you have <= before the "previous month number".
That is like manually entering <= in the search box for a field - You will get all months less than or equal what you enter after the <=.
In the second expression you do not have anything before the "previous month number".
That is like manually entering just a month number in the search box for "month number" field - you will get that month.
Hi
use this expression
Sum({<CalendarMonthName=, CalendarMonthNumber={'$(=v_Previous_Month)'}>} Sales)
Regards
Perumal
Try with the following expression:
Sum({<CalendarMonthName=, CalendarMonthNumber={'$(=v_Previous_Month)'}>} Sales)
Or
Sum({<CalendarMonthName=, CalendarMonthNumber={"=$(v_Previous_Month)"}>} Sales)
I think the question was stated badly ... (or has been mis-read)....
I found the solution but would like some explanation as to why the second expression works over the first one - which doesnt.
In the first expression you have <= before the "previous month number".
That is like manually entering <= in the search box for a field - You will get all months less than or equal what you enter after the <=.
In the second expression you do not have anything before the "previous month number".
That is like manually entering just a month number in the search box for "month number" field - you will get that month.