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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Buddika
Contributor
Contributor

Aggregated function

Hi 

can somebody help me to write the following mathematical equation in Qlik sense

Buddika_0-1656649546674.png

Thanks

Ishani

Labels (1)
4 Replies
vinieme12
Champion III
Champion III

can you post some sample data and explain the expected output

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Buddika
Contributor
Contributor
Author

Hi,

I want to calculate age standardised rates for alcohol attributable hospitalisation and mathematical formula is as follows:

Buddika_0-1656886494659.png

 

 

And my data set is similar to following

 

ethnicity

gender

age_group

population

standard_poulation

sum(attributable_fraction)

eth 2

Female

65plus

24

21276

0.56

eth 1

Male

65plus

10

21276

1.12

eth 1

Male

35_39

37

26424

0.56

eth 2

Male

55_59

82

27066

0.56

eth 2

Male

65plus

195

21276

0.23

eth 2

Male

25_29

121

31953

0.56

eth 2

Male

30_34

103

28623

0.56

eth 2

Female

20_24

233

31530

0.56

eth 2

Male

25_29

103

31953

0.56

eth 2

Female

65plus

78

21276

1.12

eth 2

Male

20_24

22

31530

0.56

eth 2

Female

35_39

82

26424

0.56

eth 2

Male

25_29

86

31953

0.56

eth 2

Female

65plus

265

21276

2.1

eth 2

Male

20_24

125

31530

0.56

eth 2

Male

40_44

72

26250

0.56

eth 1

Female

15_19

30

32430

0.56

eth 1

Male

60_64

8

23859

0.56

eth 2

Female

65plus

260

21276

1.12

eth 2

Male

20_24

113

31530

0.56

eth 2

Female

20_24

94

31530

1.12

eth 2

Male

30_34

108

28623

0.56

vinieme12
Champion III
Champion III

 

=SUM(AGGR(

((sum(attributable_fraction) / sum(population)) * sum(standard_poulation))

/

sum(TOTAL standard_poulation)

,age_group))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Buddika
Contributor
Contributor
Author

Hi

Standard population depends only on the age-group. So can't use sum(standard_population) term in the equation.

Regards