hello
Can someone please help to translate this IIF statement to CASE WHEN. tried doing this myself but not working
--IIf(Sum(IIf([QTR_ID]=[QtrID],1,0))>0,"Yes","No") AS [Change This Qtr Y/N]
CASE
(
SUM(CASE
WHEN [QTR_ID]=[QtrID] THEN 1 ELSE 0)) WHEN >0 THEN YES ELSE NO
END
)
END
AS [Change This Qtr Y/N]
Can someone please help to translate this IIF statement to CASE WHEN. tried doing this myself but not working
--IIf(Sum(IIf([QTR_ID]=[QtrID],1,0))>0,"Yes","No") AS [Change This Qtr Y/N]
CASE
(
SUM(CASE
WHEN [QTR_ID]=[QtrID] THEN 1 ELSE 0)) WHEN >0 THEN YES ELSE NO
END
)
END
AS [Change This Qtr Y/N]