Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

compare d-7 sales to prior week

Hello,

I'm quite pleased with my progress so for but now it looks like I need a little help from the community:

I was able to calculate the sales of the last week by building the following expression

Sum({<OrderDate = {'>=$(=Date(Max(OrderDate)-6))'}>} Sales)

my next step is to compare this value to the sales of the week before

Starting on: Max(OrderDate)-13

Ending on: Max(OrderDate)-7

Could you help me with this expressions?

Thanks

Tom

1 Solution

Accepted Solutions
sinanozdemir
Specialist III
Specialist III

Maybe something like the below:

Sum({<OrderDate = {'>=$(=Date(Max(OrderDate)-13))<=$(=Date(Max(OrderDate)-7))'}>} Sales)


Hope this helps.

View solution in original post

6 Replies
varunreddy
Creator III
Creator III

Hi Tom,

Try this.

vprevious - Max(OrderDate)-13

vpresent - Max(OrderDate)-13

Sum({<OrderDate = {'>=$(vpresent)<=$(vprevious)'}, OrderDate=>} Sales)

Hope this helps!

regards,

Varun

sinanozdemir
Specialist III
Specialist III

Maybe something like the below:

Sum({<OrderDate = {'>=$(=Date(Max(OrderDate)-13))<=$(=Date(Max(OrderDate)-7))'}>} Sales)


Hope this helps.

jagan
Luminary Alumni
Luminary Alumni



Sum({<YearDimensionName=, QuarterDimensionName= MonthDimensionName=, OrderDate = {'>=$(=Date(Max(OrderDate)-13))<=$(=Date(Max(OrderDate) - 7))'}>} Sales)


This portion in the above expression YearDimensionName=, QuarterDimensionName= MonthDimensionName= ignore the selection in Year, Quarter and Month fields and always shows last week details.


Hope this helps you.


Regards,

Jagan.

qlikviewwizard
Master II
Master II

Hi Jagan,

Please verify your Set analysis expression. It is not working for me.

Thank you.

Capture.JPG

Not applicable
Author

that's the one, thanks Sinan!

jagan
Luminary Alumni
Luminary Alumni

It should work, may be date format is the issue.