Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

sunil1989
New Contributor

Calculate variance

Hi ,

I am new to the qlik.

My requirement is i have to calculate the variance on the DeliveryStartDateTime and store dimension i.e.

count(orderid)/count(orderid) where DeliveryStartDateTime= DeliveryStartDateTime - 7

but i am 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 .


and can we handle this using AS-of Table and how?

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

1 Reply

Re: Calculate variance

May be... haven't tested

count(orderid)

/

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