Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
reinholdgraf
Creator
Creator

Standard Deviation in a chart

Hi.

I need to calculate average and standard-deviation of stock-movements.

Average is calulated as following and working:

AVG(TOTAL Aggr(Sum([LV_M-Abgang-Gesamt]),[LV_JahrMonat/YearMonth]))

Standard-Deviation - actually no conclue. Tried a few approaches, but not working.

Target must be the standard-deviation related only(!) to the selected period.

Any idea ?

Regards,

Reinhold

17 Replies
reinholdgraf
Creator
Creator
Author

OK for this example.

Coming to the management-requirement, there are some other problems to solve:

The table shows only 1 line per article, where stock-value, consumption, average and standard-deviation have to be shown and calculated according to several filters (period, divison, etc.)

In this case, the avg-/stdev-formulas have to be adjusted somehow, right ?

Pls see attachement, where avg/stdev are still calculated for the whole table.

sunny_talwar

What is not right in the image? Can you point out? What do you expect to see?

reinholdgraf
Creator
Creator
Author

the red marked columns are wrong.

The values should be calculated   PER LINE

(and not for the whole table in sum. You can see, that the values are the same for each line)

In the end, the values in those columns should vary from line to line.

sunny_talwar

What is the current expression used?

reinholdgraf
Creator
Creator
Author

AVG(TOTAL Aggr(sum([LV_M-Abgang-Gesamt]),[LV_JahrMonat/YearMonth]))

Stdev(TOTAL Aggr(sum([LV_M-Abgang-Gesamt]),[LV_JahrMonat/YearMonth]))

sunny_talwar

I think you might need this

Stdev(Aggr(Sum([LV_M-Abgang-Gesamt]), Division, Lagerort, Artikelgruppe, [LV_JahrMonat/YearMonth]))

reinholdgraf
Creator
Creator
Author

OK. This works now.

Thanks a lot

leonardocapriglione
Contributor II
Contributor II

Hey, Can you help me with some doubt?

 

I'd to make a standard deviation in a range date, I use this : 

=avg(aggr(SUM({<decision={'AP'}>}amount)/Sum(amount),date))

 

but in my graphic this formula gets the standard deviation variable, I would like to have the standard deviation in the fixed date in graph.

 

Thanks,