How can I use the SUMMARIZE function with FILTER in Power BI?

The SUMMARIZE function in Power BI allows users to create a summary table based on specific columns and measures from a dataset. By combining the SUMMARIZE function with the FILTER function, users can further refine the data in the summary table by applying specific filters. This enables users to easily extract and analyze relevant information from a larger dataset, making it a useful tool for data analysis and reporting.

Power BI: Use SUMMARIZE with FILTER


You can use the following syntax in DAX to use the SUMMARIZE function with the FILTER function:

Summary Table = FILTER(
        SUMMARIZE(my_data, my_data[Team], my_data[Points], my_data[Position]),
        my_data[Team] = "A")

This particular formula creates a new table named Summary Table that contains the Team, Points and Position values from the table named my_data, filtered on the rows where the value in the Team column is equal to A.

The following example shows how to use this syntax in practice.

Example: How to Use SUMMARIZE with FILTER in Power BI

Suppose we have the following table named my_data that contains information about various basketball players:

Suppose that we would like to use the SUMMARIZE and FILTER functions to create a new table that displays the values from the Team, Position and Points columns only for the players on Team A.

To do so, click the Table tools tab, then click the New table icon:

Then type the following formula into the formula bar:

Summary Table = FILTER(
        SUMMARIZE(my_data, my_data[Team], my_data[Points], my_data[Position]),
        my_data[Team] = "A")

A new table named Summary Table will be created that contains the values from the three columns in the original table, filtered for the rows where the Team column is equal to A:

Power BI use SUMMARIZE with FILTER

Note that you can also filter on multiple conditions if you’d like.

For example, you could use the following syntax to filter the original table for rows where the Team column is equal to A and the Points column is greater than 20:

Summary Table = FILTER(
        SUMMARIZE(my_data, my_data[Team], my_data[Points], my_data[Position]),
        my_data[Team] = "A" && my_data[Points] > 20)

Feel free to filter using as many conditions as you would like.

Note: You can find the complete documentation for the SUMMARIZE function in DAX .

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x