Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to get the sales before, during and after given promotion, I'm stuck because of my set analysis expression doesn't work properly,
I have this:
and I need this:
my set analysis is this:
the before expression is:
=sum({$< SalesDate = {">=$(=Date(Start-20,'DD-MM-YYYY')) <=$(=(date(Start,'DD-MM-YYYY')))"}>} Qty)
I have my qvw here to help to understand better my pb: http://community.qlik.com/servlet/JiveServlet/downloadBody/7825-102-1-10594/SalesPromotion.qvw
Can someone help me please,
thanks in advance,
CAFC
Try using "if" instead of set analysis:
sum(if(SalesDate>=Start-20 and SalesDate<=Start, Qty))
Try using "if" instead of set analysis:
sum(if(SalesDate>=Start-20 and SalesDate<=Start, Qty))
Hi,
Please provide the sample data, so that we can help you in better way
@Sub2u
Hi,
You need to use the If() instead of set analysis, because set analysis calculates at chart level not by row level, so you have use below expression
sum(if(SalesDate>=Date(Start-20,'DD-MM-YYYY') and Date(Start,'DD-MM-YYYY'), Qty))
Hope this helps you.
Regards,
Jagan.
thanks your solution is correct!
thank you very much for your help!
Cafc
thanks for help