Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Yes as percentage of (Yes + No) graphs

Searched online and seems simple enough, but have come up short.

I am trying to create several gauge graphs from a SQL database.  All of the columns have data that is either "Yes," or "No."  I am looking for most all of my gauges to be a percentage of 'yes'.  In math terms: (count 'yes')/((count "yes") + (count "no"))*100

Table name is Outcomes

Column name is Nausea

Any help?  Thanks.

4 Replies
sunny_talwar

May be this:

Count({<Nausea = {'Yes'}>}Nausea)/Count(Nausea)

Anonymous
Not applicable
Author

may be like this?

In case of Null values, try this as well:

=num((Count({<Nausea = {'Yes'}>}Nausea)/Count({<Nausea = {'Yes','No'}>}Nausea))*100, '#,##0%' )

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

=Num(Count({<Nausea= {'Yes'}>} Nausea)/Count(Nausea), '#,##0.00%')


Hope this helps you.


Regards,

Jagan.

reddy-s
Master II
Master II

Hi joshuna,

Try this:

Count({<Nausea = {"Yes"}>}Nausea)/Count(Nausea)