Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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

1 Solution

Accepted Solutions
Highlighted

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

7 Replies
Highlighted

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

Highlighted
Creator
Creator

Anil,

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

Highlighted

Then close this thread by Flag Correct Answer

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator
Creator

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

  )

  )

Highlighted

What's the definition you have written for the

vInc.OpenPO?

Highlighted

in the variable definition just write

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

without = sign , then should work

Highlighted
Creator
Creator

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.