Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

jrepucci15
Contributor

Set analysis fails in v12.10 SR4

Did Set Analysis syntax change in v12?

This simple expression evaluates as bad in v12.10 SR4 and evaluations as good in v11.20 SR9.

Where vInc.OpenPO is set in the Settings / Variables to Year = {'2017'}

V11-expression.PNGV12-expression.PNG

When I change the expression to =Sum({< Year = {'2017'} >} Value) in v12, the expression evaluates as correct.

Puzzled,

John

Tags (2)
1 Solution

Accepted Solutions

Re: Set analysis fails in v12.10 SR4

This is bug in v12.10 SR4. But, Output will give same as i noticed earlier. 11.20 is considering as Expression but QV12 get it as simple expression with error. They are working on it for next release version

7 Replies

Re: Set analysis fails in v12.10 SR4

This is bug in v12.10 SR4. But, Output will give same as i noticed earlier. 11.20 is considering as Expression but QV12 get it as simple expression with error. They are working on it for next release version

jrepucci15
Contributor

Re: Set analysis fails in v12.10 SR4

Anil,

thanks for the response and confirmation that it is a bug.

Re: Set analysis fails in v12.10 SR4

Then close this thread by Flag Correct Answer

jrepucci15
Contributor

Re: Set analysis fails in v12.10 SR4

However, when using my production expression, I do not get the right answer.

This expression, which uses $(vInc.OpenPO) in the set analysis, returns a null()

=IF(vCurrencyType = 'USD',

  Num(IF(vShowOpenPO = 1,

  Sum(EntryValue)+Sum( {< $(vInc.OpenPO) >} POAmount ),

  Sum(EntryValue)),'$#,##0.00;($#,##0.00)'),

  IF(vCurrencyType = 'EUR',

  Num(IF(vShowOpenPO = 1,

  Sum(EntryValue)+Sum({<$(vInc.OpenPO)>}POAmount),

  Sum(EntryValue)),'€#,##0.00;(€#,##0.00)'),

  Num(IF(vShowOpenPO = 1, // if not USD or EUR, display w/out a currency symbol

  Sum(EntryValue)+Sum({<$(vInc.OpenPO)>}POAmount),

  Sum(EntryValue)), '#,##0.00;(#,##0.00)')

  )

  )

This expression, where I've replaced $(vInc.OpenPO) in the set analysis with POStatus = {'Open'}, gives the expected values.

=IF(Currency = 'USD',

  Num(IF(vShowOpenPO = 1,

  Sum(EntryValue)+Sum({< POStatus = {'Open'} >} POAmount ),

  Sum(EntryValue)),'$#,##0.00;($#,##0.00)'),

  IF(Currency = 'EUR',

  Num(IF(vShowOpenPO = 1,

  Sum(EntryValue)+Sum({<POStatus = {'Open'} >}POAmount),

  Sum(EntryValue)),'€#,##0.00;(€#,##0.00)'),

  Num(IF(vShowOpenPO = 1, // if not USD or EUR, display w/out a currency symbol

  Sum(EntryValue)+Sum({<POStatus = {'Open'}>}POAmount),

  Sum(EntryValue)), '#,##0.00;(#,##0.00)')

  )

  )

Re: Set analysis fails in v12.10 SR4

What's the definition you have written for the

vInc.OpenPO?

Re: Set analysis fails in v12.10 SR4

in the variable definition just write

POStatus = {'Open'} or 'POStatus = {'Open'}'

without = sign , then should work

jrepucci15
Contributor

Re: Set analysis fails in v12.10 SR4

The variable defn is POStatus = {'Open'}

And it does not work.  As Anil mentioned, this is a bug in v12.10 SR4.  He said that the expression should give the correct results.  While it does in my simple test app, it fails when using the above.

Note that this works just fine in v11.20 SR9.

edited;  I was able to confirm that the expression does work as expected.  This bug is just in the syntax check.