2 Replies Latest reply: Oct 16, 2017 11:15 PM by Sonia Hehar

# If Statement & Set Analysis

Hi,

I have an if statement & set Analysis for a chart. I can't seem to get the chart to work?

if([Form Value]= 'True', '1', [Form Value])

avg({\$<[Field Name] -={"13) On a Scale of 1-10 with 10 being the MOST LIKELY, how likely would you be to refer your friends and family to work for this organization?"}>}[Form Value])

• ###### Re: If Statement & Set Analysis

Please share more details or data or sample app.

• ###### Re: If Statement & Set Analysis

So [Form Value] contains numbers &  [Field Name] contains questions. I am also working with [Employee Name]. I am building a bar chart where the measure is [Form Value] which is the average of all numbers except for one [Field name] question "13) On a Scale of 1-10 with 10 being the MOST LIKELY, how likely would you be to refer your friends and family to work for this organization?". The dimension is the [Employee Name]. The numbers (data) being pulled from the database from the [Form Value] field have a script in Qlik where the number "1" as a [Form Value] is converted to a value of "true" in Qlik. So this is preventing me from averaging the number "1's". I can not change this script as it applies to other reports/rules from the database, but i would like to bypass this at the measure level in one chart, hence:

if([Form Value]= 'True', '1', [Form Value])

& the measure fx to give me the avg is the:

avg({\$<[Field Name] -={"13) On a Scale of 1-10 with 10 being the MOST LIKELY, how likely would you be to refer your friends and family to work for this organization?"}>}[Form Value])

How do I write this in the [Form Value] measure fx box?

Thanks! Your help is appreciated!