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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If does not work

Hello, I have a chart in  expression I put the following code:

if (

   IsNull (Customer)

   (((sum ({<Service = {'Type 1'}>} COST) / sum ({<Service = {'Type 1'}>} [Qty Equiv])) +

   (sum ({<Service = {'Type 2'}>} COST) / sum ({<Service = {'Type 2'}>} [Qty Equiv])) +

   )

      - 10903) / 10903,

   

      (((sum ({<Service = {'Type 1'}>} COST) / sum ({<Service = {'Type 1'}>} [Qty Equiv])) +

   (sum ({<Service = {'Type 2'}>} COST) / sum ({<Service = {'Type 2'}>} [Qty Equiv])) +

   )

      - Sum (Proposal)) / sum (Proposal)

   

   )

Customer is selected by a LIST object

If the client is empty it should return the value of the first expression, so far so good.

After I select a customer theoretically he should execute the second expression, data changes, but does not return the correct value.

They could help me with this error? thank you

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I'm pretty sure the expression you posted does not work at all. It's syntax is not correct.

This is not a condition that can be evaluated:

  IsNull (Customer)(((sum ({<Service = {'Type 1'}>} COST) / sum ({<Service = {'Type 1'}>} [Qty Equiv])) +

   (sum ({<Service = {'Type 2'}>} COST) / sum ({<Service = {'Type 2'}>} [Qty Equiv])) +  )- 10903) / 10903


talk is cheap, supply exceeds demand