Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Re: Yes as percentage of (Yes + No) graphs

May be this:

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

balrajahlawat
Esteemed Contributor

Re: Yes as percentage of (Yes + No) graphs

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%' )

MVP
MVP

Re: Yes as percentage of (Yes + No) graphs

HI,

Try like this

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


Hope this helps you.


Regards,

Jagan.

reddys310
Honored Contributor II

Re: Yes as percentage of (Yes + No) graphs

Hi joshuna,

Try this:

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

Community Browser