Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon everyone.
I am struggling to write an expression that has two conditions.
I have dimensions 'OrderSentqtyD' and 'ActWsvD'.
I need to sum the OrderSendqtyD, but excluding records where the OrderSendqtyD is -1 or less AND the ActWsvD equals zero.
So far I have been using the following expression successfully to exclude records with OrderSentqtyD -1 or less, but am unsure how to add the new condition of a zero ActWsvD:
Sum({$<OrderSentqtyD*={">-1"}>}OrderSentqtyD)
I have tried the following, but the results all come out with 0.
Sum({$<OrderSentqtyD*={">-1"},ActWsvD={"0"}>}OrderSentqtyD)
Do I need an 'if/and' expression? If so, how should it be set out?
Thank you all in advance, your help is greatly appreciated.
Leah
So
Sum({$<OrderSentqtyD*={">-1"},ActWsvD-={"0"}>}OrderSentqtyD) should return what you want
Do you want include or exclude AcdWsvD = 0?
Sum({$<OrderSentqtyD*={">-1"},ActWsvD={"0"}>}OrderSentqtyD) //include
Sum({$<OrderSentqtyD*={">-1"},ActWsvD-={"0"}>}OrderSentqtyD) //exclude
Just to clarify, If the record has both a negative OrderSentqtyD AND a zero ActWsvD, I need the record excluded.
(if it has negative OrderSentqtyD and ActWsvD above zero it has to be included, and vice versa if the OrderSentqty is positive and ActWsvD is zero it needs to be included. I only want the exclusion when both conditions apply to a record).
Hope this helps.
So
Sum({$<OrderSentqtyD*={">-1"},ActWsvD-={"0"}>}OrderSentqtyD) should return what you want
Perfect, thank you!
you´re welcome