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: 
Not applicable

Calculate standard desviation in a pivot table

Hello everyone! I need to calculate the standard deviation with stdev() function in a pivot table. In the table I have the dimensions Month, Order Number, Quantities of supplies. I want to calculate the standard deviation of the quantities of supplies for the month that is appropriate for the dimension. An example:

Month Order Number Quantities of supllies     Standard Desviation

1               23839                          9                                      stdev(9, 1, 3, 5)

1               90202                          1                                       stdev(9, 1, 3, 5)

1               20293                          3                                       stdev(9, 1, 3, 5)

1               20482                          5                                       stdev(9, 1, 3, 5)

2               50607                          2                                       stdev(2, 10)

2               40693                         10                                      stdev(2, 10)

The standard desviation for moth 1 will be stdev(9, 1, 3, 5)

The standard desviation for moth 2 will be stdev(2, 10)

Thank you!!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Then try like:

Stdev( Total <Month> Aggr(count (DISTINCT [Nro. Entrega]) , Month, [Order Number]) )

View solution in original post

7 Replies
tresesco
MVP
MVP

Try:=Stdev( Total <Month> [Quantities of supllies])

Attached qvw

Not applicable
Author

A question, the field [Quantities of suplies] in fact is another expresion:

  count (DISTINCT [Nro. Entrega])


tresesco
MVP
MVP

Then try like:

Stdev( Total <Month> Aggr(count (DISTINCT [Nro. Entrega]) , Month, [Order Number]) )

Not applicable
Author

Show all in 0 zeros.

tresesco
MVP
MVP

Could you share sample app with sample data?

Not applicable
Author

Sorry, finally it worked. Thank you!!!!!

lawrenceiow
Creator II
Creator II

tresesco, I have been given a link to your answer (posted here) by Oswaldo Vasquez as he has suggested that it will help me with the problem I have with StDev, as described here: Re: Why does my Avg expression not work (I mean how do I get it to work)

I have tried modifying your answer for my problem but it does not seem to work. Would you mind taking a look at my post?

Thank you

Lawrence