Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Cannot use script -=

Hi All,

Please below my script:

if(ID = 'A1', sum({<[PRODUCT] -= {'UNIT-NON'}>} AMOUNT)/1000000)

why field amount for font colour not brown? what's wrong in my script?


4 Replies

Re: Cannot use script -=

Probably nothing is wrong. The syntax highlighter is not correctly showing some syntax as incorrect, when it's correct in fact.

Does your expression evaluate in the chart?

Re: Cannot use script -=

It shows as error but it works .... you can use the equivalent expression:

if(ID = 'A1', sum({<[PRODUCT] = {'*'} - {'UNIT-NON'}>} AMOUNT)/1000000)

let me know

Esteemed Contributor

Re: Cannot use script -=

Try this:

=sum({<ID = {'A1'},[PRODUCT] -= {'UNIT-NON'}>} AMOUNT)/1000000)

Re: Cannot use script -=

Which version & SR of QlikView are you using?

Versions prior to v11.2 SR12 will show everything after a -= underlined in red although the syntax may be correct.

Community Browser