If a data source API can’t pull older periods of historical data, or if large data sets are loading slowly, the Combine new results with old setting in Supermetrics for Google Sheets can help.
If the data source you’re pulling from doesn’t have the Date dimension, use the APPEND_RESULTS setting instead.
- Open the Supermetrics sidebar in Google Sheets.
- Set the query’s date range settings as far back as you need them to go, or as far back as the data source will allow.
- Click the Options section.
- Check the box for Combine new results with old. Any query refresh after this point will append the data to the bottom of the existing data.
- Run the query to populate your Sheet with data.
- Click on any cell with data from this query.
- In the sidebar, click Modify.
- Navigate to the date range setting. Set it to a smaller range — a week, for example — or any range appropriate to your data.
- Click Apply changes to run the query again.
Now each time this query runs, it will append the missing data to the end, depending on the date range window you set. It won’t add duplicate dates or rows, but only append data that is new, or was missing before.
- If using this setting with a source that tracks conversions (Facebook Ads, Google Ads, etc.), make sure the minimum date range of the query is as long as the longest conversion window. For example, if you’re using 28- day click, you would want the range to be at least 28 days long to ensure those click counts are updated properly.
- This feature doesn’t support splitting by column instead of row for the date dimension. Split by row instead.
- If you enable the feature after the first run has been completed and there's already data, it may cause unexpected behavior. To avoid this, start a new query with the setting already enabled before you run it for the first time.
- If you’ve already run the query, delete all the existing data, enable the setting, and then pull the old historical data. Once that’s done, change the date range to its permanent setting.
Avoid duplicate results
If your data or data source changes in a way that causes duplicate results with this setting — for example, if a campaign name changes in the data source, which also changes historical campaign names, duplicating the new campaign in your reporting — there are some steps you can take to resolve the issue.
- Open a Sheet. Create a query with the Campaign ID and Date metrics. Enable the Combine new results with old setting.
- In a second Sheet, build a report with Campaign ID, Campaign name, and a metric like Impressions, with the Combine new results with old setting enabled.
- In the first Sheet, use vlookup to match campaign IDs between your 2 Sheets, and bring the Campaign name into the first Sheet.
In this example, the second Sheet acts as a lookup table. Vlookup always returns a singular value, and if the second Sheet is sorted by latest first, it will bring the most recent campaign name even for historical values.