Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
jsdondon
Partner - Contributor
Partner - Contributor

Variance / écart type

Hi,

I've got an error with variance in qlikview

This is the series of grades obtained in the by 70 students

COUNTRY

NB_STU

NOTES

P1

1

4

P1

1

5

P1

7

6

P1

3

7

P1

10

8

P1

12

9

P1

8

10

P1

2

11

P1

6

12

P1

6

13

P1

6

14

P1

3

15

P1

2

16

P1

0

17

P1

1

18

P2

1

20

P2

1

10

I need to calculate variance for each country such as

VARIANCE

P1

9,370891

P2

25

P1+ P2

10,46714

I’ve used formula

sum(

            (

            NB_STU

            )

            *

            sqr(

                        NOTES -

                                    sum(

                                               total

                                               Aggr(Sum(NOTES * NB_STU), COUNTRY)

/Aggr(Sum(NB_STU), COUNTRY)

                                               )

                        )

            )

/

sum(Aggr(Sum(NB_STU), COUNTRY))

It works only if I filter data on a country

PAYS

VARIANCE

PAYS1

9,37

But KO when no filter

PAYS

VARIANCE

PAYS1

234,37

PAYS2

128,26

I can’t identify what is wrong, could someone help please?


Thanks a lot

Labels (1)
4 Replies
ogautier62
Specialist II
Specialist II

hello,

use function stdev() for standard deviation it's more simple,

regards

jsdondon
Partner - Contributor
Partner - Contributor
Author

Hi,

Thanks for the function but I can't see how to use it with two kpi

ogautier62
Specialist II
Specialist II

Remove word total in sum (total aggr(

ogautier62
Specialist II
Specialist II

Hi

I apologize you're rigth for your formula, stdev doesn't work

regards