Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
akuttler
Creator
Creator

Set modifier with relational operator Not equal to 0

Hello,

I have a variable for 2017 transactions:

Sum({<ITEMTYPE={'I-P','P-P','P'},Year={2017},Trans<>{0} >}Trans)

I am trying to exclude transactions that equal "0.00" but it gives me an error in the expression.

Thanks in advance.

1 Solution

Accepted Solutions
devarasu07
Master II
Master II

Hi,

you can try like below,

Sum({<ITEMTYPE={'I-P','P-P','P'},Year={2017},Trans={'<>0'} >}Trans)

or

try this

Sum({$<ITEMTYPE={'I-P','P-P','P'},Year={2017},Trans={"=sum(Trans)<>0"} >}Trans)


if above method not working then u can try

Sum({$<ITEMTYPE={'I-P','P-P','P'},Year={2017},Trans-={0} >}Trans)

if still has issue then share the mock data and expected output. tks

View solution in original post

3 Replies
devarasu07
Master II
Master II

Hi,

you can try like below,

Sum({<ITEMTYPE={'I-P','P-P','P'},Year={2017},Trans={'<>0'} >}Trans)

or

try this

Sum({$<ITEMTYPE={'I-P','P-P','P'},Year={2017},Trans={"=sum(Trans)<>0"} >}Trans)


if above method not working then u can try

Sum({$<ITEMTYPE={'I-P','P-P','P'},Year={2017},Trans-={0} >}Trans)

if still has issue then share the mock data and expected output. tks

silvacarlos
Creator II
Creator II

Why not


Sum({<ITEMTYPE={'I-P','P-P','P'},Year={2017},Trans-={'0'} >}Trans)?

akuttler
Creator
Creator
Author

I actually gave your the wrong expression it should of been

Count({<ITEMTYPE={'I-P','P-P','P'},ServiceYear={2017}>}distinct ENCID)

So I tried the 2nd suggestion:

Count({$<ITEMTYPE={'I-P','P-P','P'},ServiceYear={2017},Trans={"=sum(Trans)<>0"} >}distinct ENCID)

and it works perfect...it excludes ENCID's where the sum of Trans is equal to 0.00

Thanks so much!