[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-31。"],[],[],null,["# Use blending to reaggregate data\n\nReaggregation is a common need in data visualization. This article will help you understand the concept of reaggregation and how to achieve it in Looker Studio using data blending.\n\nOne example of reaggregation is calculating the **average of averages**. For example, say you have a table of stock price changes:\n\nThe average price change for this data is a simple [aggregation](/looker/docs/studio/aggregation).\n\nTo calculate the average price change for every sector, you'd group this table by the *Sector* dimension.\n\nTo reaggregate this data, you'd apply another aggregation function, for example, applying average again:\n\n**Reaggregation in Looker Studio**\n----------------------------------\n\nTo reaggregate metrics in Looker Studio, use [data blending](/looker/docs/studio/how-blends-work-in-looker-studio). Blending lets you work around the fact that previously aggregated fields are set to the AUTO field type. You can't change this field type, nor can you apply another aggregation function to such fields.\n\nFor example, to find the average change of stock prices per sector in Looker Studio, you'd create a blend configuration that joins the same data source with itself. Use *Sector* as the join key, and include the *Average Price Change* metric in both the left and right data sources, as shown below:\n\n*Sector* *Average Price Change*\n\nThis blended data source lets you apply new aggregations on the previously aggregated *Price Change* field.\n\n### Blending disaggregates data\n\nBlending data creates a new table from the columns that you select in the blend configuration. Metrics in the new table are treated as unaggregated numbers.\n\nBecause *Price Change* is no longer an aggregated metric, you can now apply a new aggregation function on it. The table below shows the results of creating a new metric AVG( *Price Change* ) with the previously aggregated numbers:\n\n*Price Change*\n\nThis new metric reaggregates the numbers **1.75, 3** and **-6** and displays their average: **-0.42**.\n\nCreate a ratio column using blending\n------------------------------------\n\nAnother use for blending is to create ratio metrics with already aggregated numbers. Say you want to create a ratio column that divides one metric by another.\n\nIn this example, we'll use two fields; *Clicks* and *Impressions*, coming from two different data sources.\n\nYou can create a ratio column with a calculated field *Clicks/Impressions* by blending these two data sources.\n\nAll the rows of *Clicks/Impressions* have correct information except the summary row which shows the sum of the ratio column **`SUM( `\u003cvar translate=\"no\"\u003eClicks / Impressions\u003c/var\u003e` )`** . This happens because *Clicks/Impressions* is calculated for each row \\[0.15, 0.16, 0.1\\] and then the `SUM` function is applied to it. \\[0.15 + 0.16 + 0.1 = 0.41 \\].\n\nThe correct result is **900/6500 = 0.14.** You can do this by calculating the ratio column values using the formula **`SUM( `\u003cvar translate=\"no\"\u003eClicks\u003c/var\u003e` ) / SUM( `\u003cvar translate=\"no\"\u003eImpressions\u003c/var\u003e` )`.**\n\nIn this case, the summary row shows **`SUM( SUM( `\u003cvar translate=\"no\"\u003eClicks\u003c/var\u003e` ) / SUM( `\u003cvar translate=\"no\"\u003eImpressions\u003c/var\u003e` ) )`. `SUM( `\u003cvar translate=\"no\"\u003eClicks\u003c/var\u003e` )`** \\[900\\] is divided by **`SUM( `\u003cvar translate=\"no\"\u003eImpressions\u003c/var\u003e` )`** \\[6500\\] to give **0.14.** The **`SUM`** function is then applied to it again. The result is still **0.14**."]]