Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil1989
Contributor
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
sunny_talwar

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

sunil1989
Contributor
Contributor
Author

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.

sunny_talwar

If you have continuous dates, you can try this

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

sunil1989
Contributor
Contributor
Author

Any other solution?

Thanks,

Sunilkumar

sunny_talwar

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