Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
peterderrington
Creator II
Creator II

Create a percentage pie chart with preselected values

Hi,

I'm sure someone will be able to help me again with the syntax on this one......

I have a pie chart that shows the percentage of times something happens (Field = [Questions Complete] = 'Yes'), it counts the number of times people answer a question divided by the total number of people.

Here is the current expression: Count({<[Questions Complete]={"Yes"}>}[Questions Complete])/Count(TOTAL [Questions Complete])

This works perfectly however what i want to do is replicate this chart but only show a specific selection of those people.

(Specific people being from a certain 'Place' but not from a certain 'Place to' providing they answered the question as "Yes")

I attempted to alter the expression to a similar one i already have that can count the specific people but i'm clearly doing something wrong.

Count({<Place={'09'},[Place to]-={'07','FAS'}>}[Questions Complete]='Yes')/Count({<Place={'09',[Place to]-={'07','FAS'}>}[Questions Complete])


Can anyone help?

1 Solution

Accepted Solutions
Jesh19
Creator II
Creator II

Try this.

Count({<Place={'09'},[Place to]-={'07','FAS'},[Questions Complete]={'Yes'}>}[Questions Complete])

/

Count({<Place={'09'},[Place to]-={'07','FAS'}>}[Questions Complete])

View solution in original post

5 Replies
sergio0592
Specialist III
Specialist III

It miss a bracket:

Count({<Place={'09'},[Place to]-={'07','FAS'}>}[Questions Complete]='Yes')/Count({<Place={'09'},[Place to]-={'07','FAS'}>}[Questions Complete])

peterderrington
Creator II
Creator II
Author

Thanks for spotting that, unfortunately that was just my bad typing putting it on here.

When i use that expression it shows it as 100% which isn't correct.

Jesh19
Creator II
Creator II

Try this.

Count({<Place={'09'},[Place to]-={'07','FAS'},[Questions Complete]={'Yes'}>}[Questions Complete])

/

Count({<Place={'09'},[Place to]-={'07','FAS'}>}[Questions Complete])

atoz1158
Creator II
Creator II

Hi

Try

Count({<Place={'09'},[Place to]-={'07','FAS'}>}[Questions Complete]='Yes')/Count({<Place={'09'},[Place to]-={'07','FAS'}>} TOTAL [Questions Complete])

Adrian

peterderrington
Creator II
Creator II
Author

Fantastic, this worked a treat.

Thank you very much.