Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Chart using week as Dimension and shows current and previous week's data

Hi I am trying to find out if this is possible. 

WeekStart
Count1
Previous Week
Count2

1/1/2012

10

12/25/20113
1/8/2012151/1/201210
1/15/2012211/8/201215
1/22/201251/15/201221
1/29/201231/22/20125
2/5/2012111/29/20123

I have tried as following

Dimension: WeekStart

Count1 :

=sum(Count)

Previous Week:

=WeekStart(WeekStart, -1, -1)

Count2:

=sum({$<WeekStart={$(=WeekStart(WeekStart, -1, -1))}>} Count) // -> not working as is

Do you know if above table is possible?

Thanks,

Sean

1 Solution

Accepted Solutions
Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

Try using above function. in the first column calculate Week's Sales.

In next use expression like =Above(column(1))  then if you are interested in only difference you can just hide these columns in presentation.

Regards

10 Replies
Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

Hi Nouckduri,

  Try This Expression

    =SUM({$<WeekStart={$(=max(WeekStart),-1)}>}Count)

Regards,

Nirmal.

Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

Hi Nirmal,

I have tried it, but seems not working... 

=SUM({$<WeekStart={$(=max(WeekStart)-1)}>}Count)

Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

in between (weekstart) and -1 please asign comma(,)

Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

I have tried both.

Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

what's the error it shows

Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

I have attached my file.

It gives me 0.

Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

i think error in script....can you share your app with me

Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

i have added it in my original post.

Not applicable

Re: Chart using week as Dimension and shows current and previous week's data

Try using above function. in the first column calculate Week's Sales.

In next use expression like =Above(column(1))  then if you are interested in only difference you can just hide these columns in presentation.

Regards

Community Browser