Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlikview Gurus
I am trying to display the number of printed orders based on the condition below, but I am struggling to get it right. Can someone please assist?
IF(MATCH(ORDER_TYPE_ID >= 2150 OR
IF(ORDER_TYPE_ID >= 2100 AND If(Isnull(FIRST_PRINT_DATE)))),1,0) AS PRINTED,
The script return the following error:
Error in expression:
If takes 2-3 parameters
Thanks
Then try this:
IF(ORDER_TYPE_ID >= 2150 OR (ORDER_TYPE_ID >= 2100 AND Isnull(FIRST_PRINT_DATE)), 1, 0) AS PRINTED
I think you are using or and if together... try this:
IF(ORDER_TYPE_ID >= 2150 OR ORDER_TYPE_ID >= 2100 AND Isnull(FIRST_PRINT_DATE), 1, 0) AS PRINTED
The statement in red looks redundant. If ORDER_TYPE_ID >= 2100, it will be >= 2150, right? So may be you need just this
IF(ORDER_TYPE_ID >= 2100 AND Isnull(FIRST_PRINT_DATE), 1, 0) AS PRINTED
the statement is not redundant. In Oracle script is like this
Select Count(1) PRINTED
FROM ORDER
WHERE order_type_id >= 2150 or (order_type_id >= 2100 and first_print_date is not null)
I would like to convert this script into Qlikview function
Then try this:
IF(ORDER_TYPE_ID >= 2150 OR (ORDER_TYPE_ID >= 2100 AND Isnull(FIRST_PRINT_DATE)), 1, 0) AS PRINTED