4 Replies Latest reply: Jan 12, 2016 1:21 PM by Sangram Reddy

# 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.

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

May be this:

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

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

• ###### 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.

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

Hi joshuna,

Try this:

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