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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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])

2 Replies
shraddha_g
Partner - Master III
Partner - Master III

Please share more details or data or sample app.

Not applicable
Author

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!