Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have a list of promotion events, Promo_start_date and Promo_end_date, lets consider i am having promotion events for last 3 years.
To show the current year and last year Promo sales, i am using
Sum({<year={$(=max(Year))}>}sales)
and
Sum({<year={$(=max(Year)-1)}>}sales)
Next i need to show last 7 days sale. When i use Max(promo_to_Date)-7, it's not throwing desired output, how can i build the expression?
Help me on this. Thanks in advance.
Regards,
Sadasiva
if(
(Date<=Promo_Date_To) and(Date>= Promo_Date_To - 6),
Promo_Event
)
this condition works for me, to get last n days sales.
Hi Sadasiva!
Try with this:
Week(promo_to_Date) - 7
but you will have trouble at the start of the year
Hi Juan,
Need to consider the year aswell, I am looking current and last year numbers by promo event
Regards,
sadasiva
Sadasiva,
you can tho this in the script:
AUTONUMBER( year_field & '-' & month_field & '-' & WEEK(date_field)) AS new_field
So you can rest 7 to the new_field
¡Good luck!
Hi Juan,
I have linked promotion dates to my Posting date, from there am picking the sales.
Here the problem was every promotion start in different date and end with different dates. When i am seeing the current year sales, overall i am able to view. How can i show last 7 days of every promotion days by promotion event.
Hope you understand my problem.
Regards,
Sadasiva
Hi Sadasiva,
So you have to create a flag (a new field) in the script to know for each one is you must show it or not.
if(
(Date<=Promo_Date_To) and(Date>= Promo_Date_To - 6),
Promo_Event
)
this condition works for me, to get last n days sales.