Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

percent ++

Hello,

New to QVlets say I have this table:

name

choice

date

dan

a

12/1/2011

peggy

a

12/1/2011

dan

b

12/2/2011

ben

C

12/3/2011

dan

b

12/3/2011

I need to present the percent of number of times  a certain person chose a certain decision form all his decision. For example dan chose option B (twice ) and dan made 3 decision in total meaning  dan chose B 66.67% times.

how can I present this with a chart showing dan with 66.67% ( while choosing dan  & choosing B in the list boxes)?

Thanks  for the help

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Maybe this?

count(choice)/count({<choice=>} choice)

View solution in original post

6 Replies
johnw
Champion III
Champion III

Maybe this?

count(choice)/count({<choice=>} choice)

Anonymous
Not applicable
Author

thanks it work could u explain this part count({<choice=>} choice) ??

johnw
Champion III
Champion III

That count is using set analysis.  The {<choice=>} part is where the set is defined.  What it says is basically "ignore any selections in choice".  So that count says "count the number of choice records while ignoring any selections in choice".  So it's the count of all of that person's choices, ALL the decisions that Dan made, even though you selected choice B.

If you're new to set analysis, you can find more about it in the help file index, or in the reference manual.

Anonymous
Not applicable
Author

Thanks alot  John

IAMDV
Luminary Alumni
Luminary Alumni

Hi John,

Can we use the Total qualifer? Something like this...

count(choice)/count(Total choice)

Thanks,

DV

johnw
Champion III
Champion III

We could indeed use count(choice)/count(total <name> choice) if no dimensions were selected.  But in this case, we are "choosing B in the list boxes", so ignoring the choice dimension isn't sufficient.  We have to ignore the choice selection, which suggests using set analysis.