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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Help with expression

Hi,

I need to write an expression for any EAN ending with 6 0's, StockQty otherwise Sum(StockQty). but not completely sure how to tell qlikview to look at the last 6 digits of the EAN...

Currently my expression is just :

Sum(StockQty)

but i have noticed that this expression doesn't work for any EANS ending with 6 0's (5020521000000). I now realise that i can't sum these items up, they need to be seperated to be able to give the correct figure.

so i need an expression that will just display the StockQty for EANS ending in 6 0's, but sum(StockQty) for all other EANS.

Can anyone help please?

2 Replies
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Any help with this please ?

Not applicable

Hello Hopkinsc,

you can try in your expression the good old if() like this:

sum( if(Right(EAN,6) = '000000', Qty))


and

sum( if(Right(EAN,6) <> '000000', Qty))


HtH

Roland