Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
can somebody help me to write the following mathematical equation in Qlik sense
Thanks
Ishani
can you post some sample data and explain the expected output
Hi,
I want to calculate age standardised rates for alcohol attributable hospitalisation and mathematical formula is as follows:
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 |
=SUM(AGGR(
((sum(attributable_fraction) / sum(population)) * sum(standard_poulation))
/
sum(TOTAL standard_poulation)
,age_group))
Hi
Standard population depends only on the age-group. So can't use sum(standard_population) term in the equation.
Regards