Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
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
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.
hirishv7
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 !

Chanty4u
Esteemed Contributor III

Re: Population Pyramid

hi

PFApoplat.png

Re: Population Pyramid

nice to see you posting again.

regards

Marco

Not applicable

Re: Population Pyramid

Thank you John

MVP
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
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%.

Community Browser