# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
Not applicable

## Population Pyramid

Can anyone explains to me what those expression mean?

1. Sum({<Sex={'female'}>}Population)
2. -Sum({<Sex={'male'}>}Population)
3. Sum({<Sex={'female'}>}Population) / sum(Population)
4. =num(100*(Sum({<Sex={'female'}>}Population)) / Sum(Population)) , '##.#'& '%'
8 Replies
MVP

## Re: Population Pyramid

1. Sum of female population
2. Negative sum of male population
3. Percentage of population that is female
4. Someone displaying that percentage incorrectly. Instead of this, expression #3 should be used, and change the numeric formatting in the chart to percentage. There might be a reason it's handled this way in this specific case, of course.
Honored Contributor

## Re: Population Pyramid

Hi,

Hope they are fine expect the 4 th as John Mentioned. Can you elaborate and  tell what your are looking to see in the 4th Expression !

Esteemed Contributor

## Re: Population Pyramid

Esteemed Contributor III

hi

PFA

MVP

## Re: Population Pyramid

nice to see you posting again.

regards

Marco

Not applicable

Thank you John

MVP

## Re: Population Pyramid

Thanks! I'm still trying to find time in my schedule, but I do have the support of my employer for contributing here again. And I really should have talked about set analysis, as that was more the real question here. Thanks for doing so, balrajahlawat‌.

MVP

## Re: Population Pyramid

The last expression has an easily-missed "&" in it to append the "%" rather than have it as part of the numeric format, so I believe it would show as 40.0% instead. Well, it looks like there's a missing ")", so that can be the source of some confusion, and what was really intended isn't entirely clear. I was thinking it belonged before the "&" since I think that would give the right answer, but if you put it after the end of the whole expression, then yeah, it would probably show the wrong answer, 4000.0%.