Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
sunil1989
New Contributor

Calculate week variance

Hi ,

Thanks In advance!!!!

i am having date field delivery date , which has daily date records in it ,

i have to calculate the variance on the basis of Dimension  delivery date and my expression should be

count(orderid) / count(orderid) where deliverydate -7

but iam not able to handle this in set analysis can any one help on this.

Should i handle this at script level or at expression level?

i have tried below expression .

count(orderid) / count({1<DeliveryStartDateTime={"$(=date(DeliveryStartDateTime-7,'DD-MM-YYYY'))"}>}orderId)

Thanks,

Sunil

5 Replies
Highlighted

Re: Calculate week variance

Do you have DeliveryStartDateTime as your dimension by any chance? Would you be able to share a sample?

Highlighted
sunil1989
New Contributor

Re: Calculate week variance

yes , DeliveryStartDateTime(delivery date mentioned above) is my deimension

i cannot share the sample because its on remote desktop, i cannot copy from remote to local machine.

Highlighted

Re: Calculate week variance

If you have continuous dates, you can try this

Count(orderid)/Above(Count(orderId), 7)

Highlighted
sunil1989
New Contributor

Re: Calculate week variance

Any other solution?

Thanks,

Sunilkumar

Highlighted

Re: Calculate week variance

This did not work? May be use The As-Of Table