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

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?

Thanks

4 Replies
swuehl
MVP
MVP

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?

alexandros17
Partner - Champion III
Partner - Champion III

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

Anonymous
Not applicable
Author

Try this:


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

Colin-Albert
Partner - Champion
Partner - Champion

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.