Coupler.io Blog

How to Use Power BI SUMMARIZE: Syntax, Examples, And Best Practices

How to Use Power BI Summarize Syntax Examples And Best Practices

What is SUMMARIZE in Power BI?

The SUMMARIZE DAX function performs a GROUP BY operation. It allows you to specify one or more columns for grouping, then it applies the aggregate function before populating a new table with the calculated results. The function can use any given criteria to summarize datasets with a large number of rows into one table. 

What is the function’s syntax and parameters?

Here’s the syntax for Power BI SUMMARIZE:

SUMMARIZE (<table>, <groupBy_columnName>[, <groupBy_columnName>]...[, <name>, <expression>]...)

The parameters in this formula are:

Return Value

The SUMMARIZE formula returns a table containing the specified columns for the groupBy_columnName arguments and the summarized columns with the aggregated values. 

Parameter Rules 

An example use case

Here’s a sales table with columns for product, category, quantity sold, and revenue. You can aggregate your data to pay closer attention to each data point and extract detailed metrics. 

To summarize the total revenue by category, apply:

SUMMARY TABLE = SUMMARIZE(Sales_data, Sales_data[Category], "Total Revenue", SUM(Sales_data[Revenue])))

The resulting table:

To calculate the average quantity sold for each category, use this function:

Summary_Table2 = SUMMARIZE(Sales_data, Sales_data[Category], "Average Quantity Sold", AVERAGE(Sales_data[Quantity Sold]))

The resulting table: 

In the above examples, you see the name of our result tables before the actual SUMMARIZE function itself. This should help you remember that Power BI requires users to specify the name of the summary table before they start writing the DAX function. 

What does the SUMMARIZE function do in Power BI?

It helps you reorganize datasets for more effective analysis. Here are things you can achieve by using this function.

How to group and summarize data with this function?

Step 1. Get your data into Power BI

First, you need to extract data from your sources. You can import a data table manually, upload a CSV or XLSX file, or pull data from the supported services in Microsoft Power BI.

If you work with large datasets, it’s more convenient to use Coupler.io. It is a no-code connector to pull data from over 60 sources like QuickBooks, Salesforce, Facebook Ads, etc. Its data refresh functionality also ensures that your datasets and charts are always updated.

To add data to Power BI, select your data source, and click the Proceed button below:

Connect your data source to Power BI with Coupler.io

Get started for free

Step 2. Apply the SUMMARIZE function

Let’s see how you can apply the function when working in Power BI Desktop: 

In Report View, go to the Modeling tab and choose New Table.

Or switch to Table View, and choose New Table from the Home tab.

Below, there are some example functions for our SaaS Sales dataset. 

To calculate average usage per subscription plan: 

Summary Table = SUMMARIZE(SAAS_Sales, SAAS_Sales[SubscriptionPlan], "Average Usage", AVERAGE(SAAS_Sales[UsageInGB]))

The output table:

To calculate customer lifetime value:

Metrics = SUMMARIZE(SAAS_Sales, SAAS_Sales[CustomerID], "CLV", SUMX(SAAS_Sales, SAAS_Sales[MonthlyPrice]))

The resulting table:

Best practices for using SUMMARIZE in Power BI

These tips can help you make the most out of the function:

Recap: Aggregating your data for visualization purposes

The Power BI SUMMARIZE function is important for summarizing values in your columns. It also helps to aggregate data for more efficient analysis and visualization. You can use the function for calculated columns or to add complex metrics, create summary tables and combine columns from related tables. 

If you need to analyze large datasets often, then you should consider an automated option for importing data to Power BI. With Coupler.io, you can connect your app sources to Power BI and create self-updating reports and dashboards. 

Exit mobile version