title: Data Studio inconsistent in summing metrics?
body: <p>I've come across what appear to be random inconsistencies in how Data Studio is aggregating data from the same Analytics source. I can't tell if it's an issue on the software's end, or a result of my incorrectly summing and joining the data in question (or possibly misunderstanding how the aggregation is supposed to work).</p>
  <p>Would appreciate any information that could confirm if it's an issue with my process (especially regarding the choice of database join), or alternatively whether my expectations are correct and thus it's an issue on Data Studio's end.</p>
  <h2>Data</h2>
  <p>I have three data sources: A UA Analytics profile, a GA4 Analytics profile, and a blended source that is a full outer join of the two profiles on the Date dimension (UA left, GA4 right).</p>
  <p>The two profiles were added as data sources using the default DS Google Analytics connector. There aren't any filters or source-level manipulation of data, though for the purposes of this report I'm only looking at some basic metrics for the month of April 2022, via the standard date range selectors in the report.</p>
  <p>The UA Analytics profile:
  <a href="https://i.stack.imgur.com/UEibo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UEibo.png" alt="Snapshot of UA data source configuration" /></a>
  Sample of the UA metrics being used:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Date</th>
  <th style="text-align: center;">Users</th>
  <th style="text-align: center;">Sessions</th>
  <th style="text-align: center;">Bounce Rate</th>
  <th style="text-align: center;">Goal Completions</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Apr 1, 2022</td>
  <td style="text-align: center;">870</td>
  <td style="text-align: center;">955</td>
  <td style="text-align: center;">0.756020942408377</td>
  <td style="text-align: center;">85</td>
  </tr>
  <tr>
  <td>Apr 2, 2022</td>
  <td style="text-align: center;">849</td>
  <td style="text-align: center;">923</td>
  <td style="text-align: center;">0.782231852654388</td>
  <td style="text-align: center;">82</td>
  </tr>
  <tr>
  <td>Apr 3, 2022</td>
  <td style="text-align: center;">1023</td>
  <td style="text-align: center;">1105</td>
  <td style="text-align: center;">0.774660633484163</td>
  <td style="text-align: center;">100</td>
  </tr>
  <tr>
  <td>Apr 4, 2022</td>
  <td style="text-align: center;">1007</td>
  <td style="text-align: center;">1095</td>
  <td style="text-align: center;">0.74337899543379</td>
  <td style="text-align: center;">121</td>
  </tr>
  <tr>
  <td>Apr 5, 2022</td>
  <td style="text-align: center;">1111</td>
  <td style="text-align: center;">1210</td>
  <td style="text-align: center;">0.765289256198347</td>
  <td style="text-align: center;">130</td>
  </tr>
  <tr>
  <td>Apr 6, 2022</td>
  <td style="text-align: center;">1010</td>
  <td style="text-align: center;">1111</td>
  <td style="text-align: center;">0.756975697569757</td>
  <td style="text-align: center;">92</td>
  </tr>
  <tr>
  <td>Apr 7, 2022</td>
  <td style="text-align: center;">1007</td>
  <td style="text-align: center;">1141</td>
  <td style="text-align: center;">0.743207712532866</td>
  <td style="text-align: center;">100</td>
  </tr>
  <tr>
  <td>Apr 8, 2022</td>
  <td style="text-align: center;">928</td>
  <td style="text-align: center;">1009</td>
  <td style="text-align: center;">0.77205153617443</td>
  <td style="text-align: center;">80</td>
  </tr>
  <tr>
  <td>Apr 9, 2022</td>
  <td style="text-align: center;">941</td>
  <td style="text-align: center;">1054</td>
  <td style="text-align: center;">0.80550284629981</td>
  <td style="text-align: center;">72</td>
  </tr>
  <tr>
  <td>Apr 10, 2022</td>
  <td style="text-align: center;">1002</td>
  <td style="text-align: center;">1113</td>
  <td style="text-align: center;">0.761006289308176</td>
  <td style="text-align: center;">85</td>
  </tr>
  <tr>
  <td>...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  <tr>
  <td>Apr 30, 2022</td>
  <td style="text-align: center;">854</td>
  <td style="text-align: center;">931</td>
  <td style="text-align: center;">0.767991407089151</td>
  <td style="text-align: center;">75</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The GA4 profile:
  <a href="https://i.stack.imgur.com/RwcmB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RwcmB.png" alt="Snapshot of GA4 data source configuration" /></a></p>
  <p>Sample of the GA4 data being used (it was only implemented on the domain halfway through the month, so metrics are empty for the first few weeks):</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Date</th>
  <th style="text-align: center;">Total users</th>
  <th style="text-align: center;">Sessions</th>
  <th style="text-align: center;">Engagement rate</th>
  <th style="text-align: center;">Conversions</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Apr 18, 2022</td>
  <td style="text-align: center;">766</td>
  <td style="text-align: center;">791</td>
  <td style="text-align: center;">0.378002528445006</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 19, 2022</td>
  <td style="text-align: center;">890</td>
  <td style="text-align: center;">930</td>
  <td style="text-align: center;">0.394623655913978</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 20, 2022</td>
  <td style="text-align: center;">849</td>
  <td style="text-align: center;">884</td>
  <td style="text-align: center;">0.39027149321267</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 21, 2022</td>
  <td style="text-align: center;">844</td>
  <td style="text-align: center;">891</td>
  <td style="text-align: center;">0.354657687991021</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 22, 2022</td>
  <td style="text-align: center;">745</td>
  <td style="text-align: center;">780</td>
  <td style="text-align: center;">0.33974358974359</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 23, 2022</td>
  <td style="text-align: center;">833</td>
  <td style="text-align: center;">871</td>
  <td style="text-align: center;">0.330654420206659</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 24, 2022</td>
  <td style="text-align: center;">878</td>
  <td style="text-align: center;">910</td>
  <td style="text-align: center;">0.306593406593407</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 25, 2022</td>
  <td style="text-align: center;">904</td>
  <td style="text-align: center;">949</td>
  <td style="text-align: center;">0.355110642781876</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 26, 2022</td>
  <td style="text-align: center;">932</td>
  <td style="text-align: center;">982</td>
  <td style="text-align: center;">0.346232179226069</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 27, 2022</td>
  <td style="text-align: center;">910</td>
  <td style="text-align: center;">963</td>
  <td style="text-align: center;">0.349948078920042</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 28, 2022</td>
  <td style="text-align: center;">878</td>
  <td style="text-align: center;">911</td>
  <td style="text-align: center;">0.354555433589462</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 29, 2022</td>
  <td style="text-align: center;">809</td>
  <td style="text-align: center;">850</td>
  <td style="text-align: center;">0.342352941176471</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Apr 30, 2022</td>
  <td style="text-align: center;">782</td>
  <td style="text-align: center;">832</td>
  <td style="text-align: center;">0.278846153846154</td>
  <td style="text-align: center;">0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The data blend (date range is auto for both, no filters or segments applied):
  <a href="https://i.stack.imgur.com/yffCM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yffCM.png" alt="Full outer join using Date (UA) and Date (GA4) as the join condition" /></a>
  <a href="https://i.stack.imgur.com/LFUdP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LFUdP.png" alt="Snapshot of data blend configuration, with all selected dimensions and metrics visible" /></a></p>
  <h2>Expected Output</h2>
  <p>Because they're originating from the same data source, I would expect the metrics from the data blend to be equal to those of their relative individual profiles. <strong>That is, I would expect the Total Users metric from the GA4 data source, and the Total Users metric from the blended data source (which is referencing the same GA4 data source), to show the same numbers,</strong> with the same true of the UA data source.</p>
  <p>Instead, I'm getting the following results on Chart Scorecards:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Source</th>
  <th style="text-align: center;">Total users</th>
  <th style="text-align: center;">Sessions</th>
  <th style="text-align: center;">Engagement Rate</th>
  <th style="text-align: center;">Conversions</th>
  <th style="text-align: center;">User engagement</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>GA4 Profile</td>
  <td style="text-align: center;">9874</td>
  <td style="text-align: center;">11,711</td>
  <td style="text-align: center;">34.20%</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">57:30:07</td>
  </tr>
  <tr>
  <td>Blended GA4</td>
  <td style="text-align: center;">11,020</td>
  <td style="text-align: center;">11,544</td>
  <td style="text-align: center;">34.78%</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">57:30:07</td>
  </tr>
  </tbody>
  </table>
  </div><div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Source</th>
  <th style="text-align: center;">Users</th>
  <th style="text-align: center;">Sessions</th>
  <th style="text-align: center;">Bounce Rate</th>
  <th style="text-align: center;">Goal Completions</th>
  <th style="text-align: center;">Avg. Session Duration</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>UA Profile</td>
  <td style="text-align: center;">25,528</td>
  <td style="text-align: center;">31,370</td>
  <td style="text-align: center;">76.34%</td>
  <td style="text-align: center;">2808</td>
  <td style="text-align: center;">00:00:35</td>
  </tr>
  <tr>
  <td>Blended UA</td>
  <td style="text-align: center;">28,709</td>
  <td style="text-align: center;">31,370</td>
  <td style="text-align: center;">76.26%</td>
  <td style="text-align: center;">2808</td>
  <td style="text-align: center;">00:17:44</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I expect all of the GA4 metrics to match each other, but while Conversions and User Engagement match, the Total Users, Sessions, and Engagement Rate don't.</p>
  <p>For the UA data, Sessions and Goal Completions match, but the Users, Bounce Rate, and Avg. Session Duration don't.</p>
  <p>There doesn't appear to be a pattern as to which metrics have a discrepancy or by how much. They aren't multiples of each other, so I don't think it's a simple issue of rows being re-counted in the join.</p>
  <p>Even weirder, if I make Chart Tables out of the same data, the tables' summary rows don't always show the same results as the scorecards, <strong>even though they're referencing the exact same data.</strong>
  <a href="https://i.stack.imgur.com/afpOv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/afpOv.png" alt="Screenshot demonstrating mismatched results between data blend scorecards and table" /></a></p>
  <p>In addition, if I manually sum up all the metrics in each column by spreadsheet, I get results different from those in the tables' summary rows:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Source</th>
  <th style="text-align: center;">Users</th>
  <th style="text-align: center;">UA Sessions</th>
  <th style="text-align: center;">Bounce Rate</th>
  <th style="text-align: center;">Goal Completions</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>UA summary row</td>
  <td style="text-align: center;">25,528</td>
  <td style="text-align: center;">31,370</td>
  <td style="text-align: center;">76.34%</td>
  <td style="text-align: center;">2808</td>
  </tr>
  <tr>
  <td>UA manual calculation</td>
  <td style="text-align: center;">28,709</td>
  <td style="text-align: center;">31,370</td>
  <td style="text-align: center;">76.26%</td>
  <td style="text-align: center;">2808</td>
  </tr>
  </tbody>
  </table>
  </div><div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Source</th>
  <th style="text-align: center;">Total users</th>
  <th style="text-align: center;">GA4 Sessions</th>
  <th style="text-align: center;">Engagement Rate</th>
  <th style="text-align: center;">Conversions</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>GA4 summary row</td>
  <td style="text-align: center;">9874</td>
  <td style="text-align: center;">11,711</td>
  <td style="text-align: center;">34.2%</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>GA4 manual calculation</td>
  <td style="text-align: center;">11,020</td>
  <td style="text-align: center;">11,544</td>
  <td style="text-align: center;">34.78%</td>
  <td style="text-align: center;">0</td>
  </tr>
  </tbody>
  </table>
  </div><div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Source</th>
  <th style="text-align: center;">Users</th>
  <th style="text-align: center;">Total users</th>
  <th style="text-align: center;">UA Sessions</th>
  <th style="text-align: center;">GA4 Sessions</th>
  <th style="text-align: center;">Bounce Rate</th>
  <th style="text-align: center;">Engagement Rate</th>
  <th style="text-align: center;">Goal Completions</th>
  <th style="text-align: center;">Conversions</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Blended summary row</td>
  <td style="text-align: center;">28,709</td>
  <td style="text-align: center;">9874</td>
  <td style="text-align: center;">31,370</td>
  <td style="text-align: center;">11,711</td>
  <td style="text-align: center;">76.26%</td>
  <td style="text-align: center;">34.2%</td>
  <td style="text-align: center;">2808</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td>Blended manual calculation</td>
  <td style="text-align: center;">28,709</td>
  <td style="text-align: center;">11,020</td>
  <td style="text-align: center;">31,370</td>
  <td style="text-align: center;">11,544</td>
  <td style="text-align: center;">76.26%</td>
  <td style="text-align: center;">34.78%</td>
  <td style="text-align: center;">2808</td>
  <td style="text-align: center;">0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><strong>These discrepancies happen even when sampling only two rows of data at a time, and never by the same amount.</strong></p>
  <p>For this specific report, the GA4 data for Total Users, Sessions, and Engagement rate have discrepancies of 1146, -167, and 0.58 respectively for the entirety of April (or 111%, 99%, and 102% as a percentage of the GA4 data source).</p>
  <p>Populating the same report with Analytics' default demo data (see link at bottom), the GA4 data for Total Users, Sessions, and Engagement rate have discrepancies of 51732, 2432, and -2.1 for the entirety of April (or 135%, 102%, and 97% as a percentage of the GA4 data source).</p>
  <p>Looking at just April 1 &amp; April 2 with that same demo data, there are discrepancies of 160, 93, and -0.71 (or 102%, 101%, and 99% as a percentage of the GA4 data source).</p>
  <p>Applying CAST to the metrics (e.g. <code>CAST(Total Users as number)</code>) has no effect and results in the same metrics and sums.</p>
  <h2>Chart configuration</h2>
  <p>All scorecards have the same default configuration, with the only difference being the data source that's referenced:</p>
  <p><a href="https://i.stack.imgur.com/FKZsD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FKZsD.png" alt="Config for non-blended GA4 Total Users scorecard" /></a>
  <a href="https://i.stack.imgur.com/uikle.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uikle.png" alt="Config for blended GA4 Total Users scorecard" /></a>
  <a href="https://i.stack.imgur.com/spR0Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/spR0Y.png" alt="Config for non-blended UA Bounce Rate scorecard" /></a>
  <a href="https://i.stack.imgur.com/EcZKN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EcZKN.png" alt="Config for blended UA Bounce Rate scorecard" /></a></p>
  <p>Same for the tables, with the exception of relabeling Sessions and Sessions as UA Sessions and GA4 Sessions for clarity:</p>
  <p><a href="https://i.stack.imgur.com/yxB1s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yxB1s.png" alt="Config for blended data table" /></a>
  <a href="https://i.stack.imgur.com/uuT4O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uuT4O.png" alt="Config for non-blended UA data table" /></a></p>
  <h2>Issue</h2>
  <p>Why are these discrepancies happening, since to my understanding these charts <em>should</em> be pulling the same data and summing in the same manner, and therefore <em>should</em> have the same results? Am I misunderstanding the output I should be receiving?</p>
  <p>I've triple checked all my charts to make sure they're using the same aggregation functions, date range, source metrics, etc. etc. so I don't know why so many of these summed metrics are inconsistent. I thought it might be a matter of date range processing, but I don't think that would explain the different sums in different chart types for the exact same data source, or why the UA sessions match up with each other but the GA4 sessions don't.</p>
  <p>I've also tried different join methods for the blended data, but all return the same results except for cross joining (which multiplies all resulting values, as expected).</p>
  <p>Am I missing something? My manual calculation results make me feel like the blended and spreadsheet metrics are more &quot;trustworthy&quot;, but the blended data still showed incorrect summary row results in the report table, so I'm genuinely unsure if I'm getting correct results for any given data source.</p>
  <h2>Report</h2>
  <p>Made a copy populated with demo Analytics data, so the numbers aren't the same, but similar discrepancies are happening: <a href="https://datastudio.google.com/reporting/40bab31a-a0d0-4b79-8dcf-25c11279f229" rel="nofollow noreferrer">https://datastudio.google.com/reporting/40bab31a-a0d0-4b79-8dcf-25c11279f229</a></p>
  <p>Spreadsheet with manual summing of exports of the tables from the same report (note that they don't match said report): <a href="https://docs.google.com/spreadsheets/d/1CvM-4PqPNfBqNIlzJEe9QQVQ5tWNVkOdaZOVLfqnRRU/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1CvM-4PqPNfBqNIlzJEe9QQVQ5tWNVkOdaZOVLfqnRRU/edit?usp=sharing</a></p>
  <p>Even more simplified report that specifically highlights the discrepancy between default data source aggregation, and aggregation via spreadsheet: <a href="https://datastudio.google.com/reporting/a4f989ed-474e-4f04-955d-5ffb6339fc3a" rel="nofollow noreferrer">https://datastudio.google.com/reporting/a4f989ed-474e-4f04-955d-5ffb6339fc3a</a></p>