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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

complicated if statement

Hello community

I have an 'if' statement that is giving me hell, i need your help.

We have the following fields:

[Boys]

[Girls]

[#No]

[Children]

The [Children ] can have >1 [#No].

The original expression is :

((sum([Boys])-sum([Girls]))* 0.90)-avg([Boys])

Now the 'if ' statement is supposed to be something like:

If ([#No]>1,((sum([Boys])-sum([Girls]))* 0.90)-avg([Boys]),(((sum([Boys])* 0.90)-avg([Boys])))

Dimension [Children]

Some how im getting the wrong answer when [Children] has only 1 [#No]

Please help.

Labels (1)
10 Replies
Not applicable
Author

Thank you Michael, It worked perfectly.