1

I am trying to do something very simple, and getting this error.

IF [ORDER_LATE] = "Y" THEN [ORDER_QTY] END
Alex Blakemore
  • 11,301
  • 2
  • 26
  • 49

1 Answers1

2

Assuming [ORDER_LATE] is your non aggregate and [ORDER_QTY] is your aggregate.

Create a separate calculated field called "LateOrder" for determining a boolean value for your [ORDER_LATE] dimension, this will be able to interact with your aggregated [ORDER_QTY].

IF UPPER([ORDER_LATE]) = "Y" THEN TRUE ELSE FALSE END

(Or equivalently, just UPPER([ORDER_LATE]) = “Y” since booleans are first class expressions)

Go back to your original calc and replace [ORDER_LATE] = "Y" with [LateOrder] = TRUE

IF [LateOrder] = TRUE THEN [ORDER_QTY] END

(Or equivalently, just IF [LateOrder] THEN [ORDER_QTY] END since the = TRUE is redundant)

However I do not know if you are calculating your order quantity at a fixed LOD, if so, the above solution may not be correct.

Alex Blakemore
  • 11,301
  • 2
  • 26
  • 49
MUFF.
  • 178
  • 5