Formula Generator | DAX

Summarizing Transactions by Partner with DAX

This guide presents a DAX formula to summarize sales transactions grouped by partners. It explains how to use the SUMMARIZE function to create a new table showing total sales for each partner, enhancing data analysis in Power BI.


Empty image or helper icon

Prompt

summarizes transactions in column sales based on column partner

Answer

DAX Formula for Summarizing Transactions by Partner

To summarize the transactions in the column Sales based on the column Partner, you can use the following DAX formula:

DAX Formula

Total Sales by Partner = SUMMARIZE(SalesTable, SalesTable[Partner], "Total Sales", SUM(SalesTable[Sales]))

Explanation of the Formula

  • SUMMARIZE: This function is used to group data. It creates a new table with unique values from specified columns along with the calculations you want to perform.

  • SalesTable: This is the name of the table where the Sales and Partner columns are located. Replace SalesTable with the actual name of your table.

  • SalesTable[Partner]: This specifies that you want to group the summarized data by the values in the Partner column.

  • "Total Sales": This is the name of the new column that will hold the summarized sales totals for each partner.

  • SUM(SalesTable[Sales]): This part calculates the total sales for each partner by summing the values in the Sales column.

Practical Example

Suppose you have a table named SalesData with the following content:

Partner Sales
A 100
B 200
A 150
C 50
B 100

Using the DAX formula provided:

Total Sales by Partner = SUMMARIZE(SalesData, SalesData[Partner], "Total Sales", SUM(SalesData[Sales]))

The resulting summarized table will be:

Partner Total Sales
A 250
B 300
C 50

Conclusion

The DAX formula effectively summarizes sales transactions based on partners, providing insights into total sales contributions from each partner. This approach is essential for data analysis within the Power BI environment, where users can visualize and interpret partner performance clearly.

For further learning and mastery of DAX, consider exploring resources and courses available on the Enterprise DNA Platform, which provide extensive insights into DAX formulas and data modeling techniques.

Create your Thread using our flexible tools, share it with friends and colleagues.

Your current query will become the main foundation for the thread, which you can expand with other tools presented on our platform. We will help you choose tools so that your thread is structured and logically built.

Description

This guide presents a DAX formula to summarize sales transactions grouped by partners. It explains how to use the SUMMARIZE function to create a new table showing total sales for each partner, enhancing data analysis in Power BI.