Calculated fields not functioning properly with HubSpot data in Google Data Studio

I’m having trouble with calculated fields in Google Data Studio when working with HubSpot data that comes through Supermetrics. The formulas validate successfully (green checkmark appears), but the results don’t show up correctly in my reports.

IFNULL(Campaign Source, Contact Origin Detail)

The issue is that many values from the Contact Origin Detail column aren’t appearing in my new calculated field. I’ve tried different approaches including CASE statements but get similar problems.

I need to create a simple formula that copies data from Contact Origin Detail when the Campaign Source field is empty. Is there something specific about HubSpot data that makes calculated fields behave differently? I’ve refreshed everything multiple times and tried various troubleshooting steps but nothing seems to work.

Has anyone else experienced issues with calculated fields not processing all records when using HubSpot as the data source?

had similar issue with hubspot data last month. try using COALESCE instead of IFNULL - worked better for me with supermetrics connector. also check if your contact origin detail field has any weird formatting or hidden characters that might be causing problems

This sounds like a data type mismatch issue I’ve encountered before with HubSpot through Supermetrics. The problem often occurs when one field contains string values and the other has mixed data types or null values that aren’t being recognized properly by Data Studio. Try wrapping both fields in CAST functions to ensure they’re treated as strings: IFNULL(CAST(Campaign Source AS TEXT), CAST(Contact Origin Detail AS TEXT)). Also worth checking if there are any filters applied at the data source level that might be excluding certain records from your calculated field processing. Sometimes HubSpot sends data with trailing spaces or encoded characters that break the logic even though the formula validates correctly.