Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Below expression work in table visualization but when i used the same to add into data modeling to set it as flag, it show invalid expression. How to convert below into flag in data modeling?
IF(Max(FORECASTED_DATE)=Max(PRIOR_FORECASTED_DATE),'N','Y') as FORECASTED_CHANGE
data modeling:
LOAD
*,
IF(Max(FORECASTED_FPS_DATE)=Max(PRIOR_FORECASTED_FPS_DATE),'N','Y') as FORECASTED_FPS_CHANGE
resident funnelsnap;
hi
in order to use aggr functions in the script
you need to use group by and say which dimension to use
and then joining it to your source table something like
left join (funnelsnap)
LOAD
DIM,
IF(Max(FORECASTED_FPS_DATE)=Max(PRIOR_FORECASTED_FPS_DATE),'N','Y') as FORECASTED_FPS_CHANGE
resident funnelsnap
group by DIM
;
hi
in order to use aggr functions in the script
you need to use group by and say which dimension to use
and then joining it to your source table something like
left join (funnelsnap)
LOAD
DIM,
IF(Max(FORECASTED_FPS_DATE)=Max(PRIOR_FORECASTED_FPS_DATE),'N','Y') as FORECASTED_FPS_CHANGE
resident funnelsnap
group by DIM
;