I want to calculate standard deviation divided by the avg value . I know the basic function but there is a problem.
I want to calculate the standard deviation at product level considering the other filters ( Like Date,Customer , Supplier) .
In table my dimension is Week that is fine and working fine but It is summing the quantity across the products while calculating the standard deviation. I want it to do the aggregation at product level while calculating the stdev/avg and the show the average.
Not sure how exactly we neef to write it hence showing two different approaches in below expression
/stdev( if((LeadTimeInWeeks >=AbsDeltaWeek), aggr(sum(DemandQty),DeltaWeek),Null()))
/avg(if((LeadTimeInWeeks >=AbsDeltaWeek), aggr(sum(DemandQty),ProductName),Null()))
Qlik documentation can add more example for aggr , I feel.