Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

rajeshthakur292
Contributor II

Error with the result of IF() used in script.

Hi Guys,

I am using an if statement in statement which shows the wrong result.

The if statement that i have used is as follows -

if(x<z or y<z,'x or y< z',

if(x>z or y>z,'x or y> z','x or y = z')) as "xyzpap".

But when i use it to create a pie-chart -

1) "xyzpap" as Dimension

2) Sum(values).

It gives wrong values for 'x or y<z', 'x or y >z' and 'x or y = z'.

How  do i tweak the expression to get the correct result?

3 Replies
shraddha_g
Honored Contributor III

Re: Error with the result of IF() used in script.

It doesn't seem any issue with expression you have used.

If possible share screenshots of what you have done or Sample app

rajeshthakur292
Contributor II

Re: Error with the result of IF() used in script.

I got it...it was silly on my part to post it here

The difference in result of excel file and that of qlik was because in excel the value of x,y and z were rounded-off.

And that resulted in different results!


Cheers!

shraddha_g
Honored Contributor III

Re: Error with the result of IF() used in script.

That's Good!

Community Browser