Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a weekend date as my filter option. As we follow different calendar so we have a different weekend dates.
Weekend date is the filter option.
I am calculating week on week where current week value is sum(sales)
the previous week formula that i have written is
SUM({<WEEKEND_DATE = {'$(=MAX(WEEKEND_DATE-7))'}>} sales)
but after many try and attempts of doing this i am getting the value as 0 always. Please suggest.
Note : Weekend date is difference of 7 days
Hi,
Then create variable like this
vTT=date(date(date#(max(DT1),'DD-MMM-YY'),'DD/MM/YYYY')-7,'DD/MM/YYYY')
Sorry tried but did not work..
Hi Ishan,
SUM({<WEEKEND_DATE = {'$(=MAX(WEEKEND_DATE-7))'}>} sales). Will work if an already weekend is selected in the App. So please use below expression
SUM({<WEEKEND_DATE = {'$(=MAX({1}WEEKEND_DATE-7))'}>} sales). It will by default take the max weekend_date and retrive the value -7.
Hi Vj,
The problem is when - 7 days is included in the query its not working but if i remove that -7 it is giving the current week information correctly but last week is not.
SUM({<WEEKEND_DATE = {'$(=MAX({1}WEEKEND_DATE)-7)'}>} sales). Sorry have corrected the code. Replaced MAX({1}WEEKEND_DATE-7) with MAX({1}WEEKEND_DATE)-7.
try
SUM({<WEEKEND_DATE = {"$(=DATE(MAX(WEEKEND_DATE)-7,'YourDateFormatforWeekendDate')"}>} sales)
Hi All,
No Luck.
I tried with most of the date formats but its not working.. if i am fetching the value for filtered weekend date its displaying correctly but by the time i add " - 7 " to it.. the value becomes zero.
Hi,
I managed to get the query right, but another problem came up
SUM({<WEEKEND_DATE = {'$(=MAX(WEEKEND_DATE))'}>} sales)
- SUM({<WEEKEND_DATE = {'$(=MAX(DATE(DATE(WEEKEND_DATE - 7,'DD/MM/YYYY'),'DD-MM-YYYY')))'}>} sales)
I am subtracting the selected weekend sales - previous weekend sales
but rather than that it displaying me the values in 2 separate lines.
Can you please suggest
Hi,
Pls provide some sample data and mention which query your'e using in script.
Did u try this,from my above post.
-Hirish