Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
shahamel
Contributor

Previous week

Can someone help me with this expression. I want to sum quantity. This quantity is summed for previous week. I can't seem to find the mistake.

sum({$<Year = {$(=max(Year) - $(=if(max(Week) = 1, 1, 0)))}, Week = {$(=max(Week) + $(=if(max(Week) = 1, 51, 0)))}

,
DateType={'Sales'}>} Quantity)

Any help is welcome

Gr. Sandeep

2 Replies

Re: Previous week

Hi

     Do you have date num field?

     if so, you can use like this,

     =sum({<DateType={'Sales'}, DateFieldNum = {'$(=Max(DateFieldNum,-7))'}>}Quantity)

Hope it helps

shahamel
Contributor

Re: Previous week

Hi,

It is not quite what i was looking for, but you are almost there. I am trying to use your idea . If i am succesfull i will let you know. Otherwise i will give the approriate expression if i am able to find it.

Gr. Sandeep

Community Browser