Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I've been trying to solve this for a while but with no luck.
I have made an example (attached) of using a subfield.
In the example - each 'ID' is a person, who has been able to select up to 3 favurite colours.
The problem is that the percentages on the graph work out the % using total entries in the subfield DIVIDED BY the current selection.
I.e.If you mose over Green you'll see it says 22% and we can see that of our 11 people, 6 have selected Green, so it should be over 50%
Is there any way that I can make Qlikview show the percentage of People who selected that Colour?
Any help would be really appreciated,
Thanks,
Andrew
I think you need to mark "Relative" in the expressions tab.
Try to mark and see what happens.
May be like attached? PFA
Hi Juan,
Sadly not that easy. Qlikview automatically splits this data out into one line per entry on the subfield - In the example I've hit relative and it'll give yu the percentage of the total entries for that subfield, not the number of people. Any othe rsuggestions at all?
Thanks,
Andrew
Try sum(Count)/count({<Count={'*'}>}total distinct ID). See attached qvw.
Hi Tresesco,
Thaks for submitting, but in your example (I'll use the colour green again)
I want it to show the percentage of respondents that like green, not the percentage of the total number of favourite colours.
Ie, the bar for green should show 6/11 = 55%
Is there any way around this? I would just hard-code to have =Sum(Count)/11... but need it to keep updating
Thanks
Andrew
Hi!
What I think you should be trying is the TOTAL keyword where you also can defined which field you should use for the Total. Attaching file
Brgds, Johan
PFA.
Anyway you have to keep track of the repeating colors(here only one 'Green' as you told) and add that to count which is a denominator. Here, i have simply added 1.
Edit: I totally missed your field count behavior, you can simply try:
Sum(Count)/Sum(TOTAL Count)
Hi All,
Thanks for all these, though I;ve just noticed another problem whilst working on a different part of my model which can be expalined here.
If I go onto any of the examples above and select a particular country then the percentages stop working (they all go to 100% rather than displaying the percentage of the current selection.
Does anyone know how I can have a 'percentage of current selection'. I have this issue a lot throughout my data so a solution would be really useful.
Thanks,
Andrew
Hi Andrew,
I think you should consider moving the count to the colors-field. It alls boils down to want you want to show. See attached. Or is it something else you are after?
Best Regards
Johan