Chris Potts
04/29/2026, 12:34 PMkapa.ai
04/29/2026, 12:34 PMNULL instead of 0, which causes the entire division to return NULL (and display as "no data"). The solution is to wrap your numerator metric in an IFNULL clause so that missing values are treated as 0 rather than NULL. Your metric definition should look something like this: SELECT IFNULL( (SELECT COUNT({attribute/job_id}) WHERE {attribute/your_column} = 1), 0 ) / (SELECT COUNT({attribute/job_id})) This ensures that when there are no jobs where the column equals 1, the numerator returns 0 instead of NULL, and the division can still be performed. [IFNULL docs] A few things to keep in mind: • IFNULL does not create missing rows — it only substitutes a value when a row exists but the metric returns null. If there are no rows at all for a given attribute value, IFNULL alone won't make them appear. [IFNULL docs] • Use IFNULL selectively — the documentation notes it can add computing time, so apply it only where null values are causing issues, not across all metrics. [IFNULL docs] • Division by zero — if the total job count could also be zero in some contexts, you may also want to handle that case to avoid errors. If after applying IFNULL you're still seeing "no data", it's likely that the rows themselves don't exist in your dataset for that context, which would require a different approach (such as loading placeholder data or revisiting your LDM). 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups. 👀 Our Support team monitors all messages and will jump in if needed.