Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings,
I would like to have a column in a table or chart using either expressions or variable based on the following logic:
CASE
WHEN ( PLANNED_FLAG = 'Y'
AND REASON_CODE IS NULL
AND TYPE_CODE IN ('5', '7')
AND STATUS_CODE NOT IN ('5', '7')
AND (TARGET_FLAG ='Y' OR TARGET_FLAG IS NULL))
THEN
'Y'
ELSE
'N'
END
AS CALC_COLUMN;
Can you please help.
Thank you,
If( PLANNED_FLAG = 'Y'
AND IsNull(REASON_CODE)
AND Match(TYPE_CODE,'5','7')
AND Not(Match(STATUS_CODE,'5','7'))
AND (TARGET_FLAG='Y' OR IsNull(TARGET_FLAG))
, 'Y'
, 'N') AS CALC_COLUMN
If(
PLANNED_FLAG = 'Y'
AND
IsNull(REASON_CODE)
AND
Match(TYPE_CODE,'5','7')
AND
Not Match(STATUS_CODE,'5','7')
AND
(TARGET_FLAG='Y' OR IsNull(TARGET_FLAG)), 'Y', 'N') AS CALC_COLUMN
Perfect.
Thank you.