Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

geogou1973
Not applicable

compare sales current vs previous

Hello.

How can i compare the current sales vs previous sales giving only the current year date in the selections and the chart giving me also the previous sale date in the same period and in the same weekday. Also if i give the month compare automatically the sales in the previous year. Is there any set analysis to do this ?

Below i have a sample.

Thank you in advance.

5 Replies
Not applicable

Re: compare sales current vs previous

Hi,

Have a look at attached QVW, and let me know you got what you want ?

Or let me what you want in detail.

Thanks,

geogou1973
Not applicable

Re: compare sales current vs previous

It is very usefull but when i give 23/10/2013 current sales and the week day is WED i want to compare with the 24/10/2012 that is also WED.

How can i do this ?

Not applicable

Re: compare sales current vs previous

Hi

use this expression

sum({<YEAR={$(=only(YEAR)-1)},MONTH={$(=max(MONTH))},WEEK_DAY={"$(=only(WEEK_DAY))"},DATE= >}SALES)

Not applicable

Re: compare sales current vs previous

Hi hope it will help u

Not applicable

Re: compare sales current vs previous

  Use this one...

Sum({$<DATE={">=$(=addmonths(Today(),-12)+1) <=$(=addmonths(Today(),-12)+1)"}>} SALES)