"IFNULL" no longer working

I have a looker application where I'm blending legacy data with current data like so:

SUM(Old Fb Ad Spend) + SUM (Current FB Ad Spend)

So long as I'm choosing a timeframe where both data sources have records, this works as intended. However, if I'm choosing a timeframe where we have no legacy data, the blend shows "No data"

I used to be able to fix this by adding IFNULL:

SUM(IFNULL(Old Fb Ad Spend, 0) + SUM (Current FB Ad Spend)

But that recently stopped working. Based on what I read today I also tried:

SUM(NARY_MAX(Old Fb Ad Spend, 0) + SUM (Current FB Ad Spend)

But that is also yielding "No data".

Does anyone know how to presently resolve this situation since the older solutions seem to not be working at this time?

0 2 459
2 REPLIES 2

Try using a combination of IF and IS_NULL:

SUM(IF(IS_NULL(Old Fb Ad Spend)),0,Old Fb Ad Spend) + SUM (Current FB Ad Spend)

or you can try this 
sum(if (Old Fb Ad Spend is null, 0 , Old Fb Ad Spend)) + sum (Current FB Ad Spend)

Hope it helps!

Top Labels in this Space
Top Solution Authors