Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Same Day Last Week comparison

I have a data set that looks like :

Date                 Sales  ....    ....   .....

1/20/2014          100

1/19/2014          200

1/18/2014          300

1/17/2014           400

1/16/2014          500

1/15/2014          600

1/14/2014          700

1/13/2014          800  

1/12/2014          900

Trying to create a "Same Day Last Week Expression"

Date                 Sales        Last Week

1/20/2014          100               800

1/19/2014          200               900

1/18/2014          300

1/17/2014           400

1/16/2014          500

1/15/2014          600

1/14/2014          700

1/13/2014          800  

1/12/2014          900

I can not get the Set analysis to work.(sum({$<date = {$(lw_date)}>} sales )

I appreciate any help.

1 Solution

Accepted Solutions
Not applicable

Re: Same Day Last Week comparison

Hey Amir,

Please check out the attached file. I did everything on the backend.

Hope it helps

Thanks

AJ

5 Replies
Not applicable

Re: Same Day Last Week comparison

Hey Amir,

Please check out the attached file. I did everything on the backend.

Hope it helps

Thanks

AJ

Not applicable

Re: Same Day Last Week comparison

Thank you so much Ajay, this is very clever. I really appreciate your help.

iktrayanov
Contributor III

Re: Same Day Last Week comparison

Another option is

=Below(Sum(ActualSales),7)

Not applicable

Re: Same Day Last Week comparison

You could also try something like:

sum ({$< date = {'$(=date(today(0)-7))'}>}  sales)

You could also set a date variable and call it in the set analysis, for instance:

let vSameDayLastWeek = date(today()-7);

Then the set would be:


sum({$< date = {'$(vSameDayLastWeek)'} >}sales )


Best,

Matt

Not applicable

Re: Same Day Last Week comparison

This also worked. PERFECT

Thanks

Community Browser