Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

hopkinsc
Valued Contributor II

help with expression

Hi,

i am trying to write an expression to show total sales qty (SalesQuantity) but excluding any Voided transactions. Voids have a (LineType) of V.

I thought it should be something like

Sum({$<LineType=V>}SalesQuantity

But i cannot get it to work..

Can someone help please?

1 Solution

Accepted Solutions
Not applicable

help with expression

yes it should be enclosed with {}


Sum({$<LineType -= {V}>} SalesQuantity)


Thanks Marcel! Big Smile

9 Replies
Not applicable

help with expression

Hi Hopkinsc,

try this:


Sum({$<LineType -= V>}SalesQuantity)


put a dash before an equal sign to exclude all LineType V

regards

hopkinsc
Valued Contributor II

help with expression

Hi Ronald, I have just tried that but it still returns the sales quantity including VOIDS.

Any other ideas?

marcel_olmo
Contributor III

help with expression

Maybe i'ts just formatting badly, when I have to exclude something in set analysis I always do it like this :


Sum( {$<[LineType ] -= {V} >} SalesQuantity )
If I don't use { } in the field I don't want to exclude it doesn't work.
hopkinsc
Valued Contributor II

help with expression

Thanks Marcel, but that hasn't worked either....

Not applicable

help with expression

yes it should be enclosed with {}


Sum({$<LineType -= {V}>} SalesQuantity)


Thanks Marcel! Big Smile

qliksus
Valued Contributor

help with expression

I think this will work

Sum( {$<[LineType ] = {"*"} - {V}>} SalesQuantity )

Not applicable

help with expression

Hi Hopkinsc,

that code should work. if the field LineType is two words enclosed it with []

I attached a file that shows exclusion.

hopkinsc
Valued Contributor II

help with expression

Hi Qliksus,

I have pasted your expression but i am getting an error in expression message.

hopkinsc
Valued Contributor II

help with expression

Hi, thanks everyone for your replies...

I have managed to get it working by using...

Sum({$<LineType -= {V}>} SalesQuantity)

Thanks again. Smiley Happy



Community Browser