Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am struggling to find out Standard deviation, here my expression is
stdev(aggr(sum({<Inc_CalendarDate={'>=$(=date(vCal12MonthBack))<=$(=date(vTodate))'}>}
[Invoiced Quantity]),Inc_Country))
Hi,
The Qlik Scalability place is mainly for performance related questions (testing and tools). Your question seems to be better suited in the general Sense forum:
Cheers
Is this in a chart? May be you need to use TOTAL Qualifier if it is in a chart
Stdev(TOTAL Aggr(Sum({<Inc_CalendarDate = {'>=$(=date(vCal12MonthBack))<=$(=date(vTodate))'}>} [Invoiced Quantity]), Inc_Country))
And it might make sense to add your set analysis in the outer aggregation also
Stdev(TOTAL {<Inc_CalendarDate = {'>=$(=date(vCal12MonthBack))<=$(=date(vTodate))'}>} Aggr(Sum({<Inc_CalendarDate = {'>=$(=date(vCal12MonthBack))<=$(=date(vTodate))'}>} [Invoiced Quantity]), Inc_Country))
It returns 0 value but I have solve the problem by another way
Stdev( if (
Inc_CalendarDate >= date(vCal11MonthDate) and Inc_CalendarDate <= date(vCalDate) , [Invoiced Quantity] ,0))
no need to aggregation
I think stdev not work on set analysis
Thanks for the input
Although, its good that your if statement solution works, but I would suggest you to try and make the set analysis work because set analysis tend to work better than if statement.... if you are interested to pursue this further, can you try this
Stdev({<Inc_CalendarDate = {">=$(=date(vCal12MonthBack))<=$(=date(vTodate))"}>} Aggr(Sum({<Inc_CalendarDate = {">=$(=date(vCal12MonthBack))<=$(=date(vTodate))"}>} [Invoiced Quantity]), Inc_Country))
Also, what is the format for Inc_CalendarDate? How do you create this in the script?