Formula Generator | DAX

DAX Sales Summary by Partner

This guide provides a DAX formula to summarize total sales grouped by partner from transaction data, explaining the use of the SUMMARIZE function, its parameters, and offering a practical example for better understanding.


Empty image or helper icon

Prompt

summarizes transactions in column sales based on column partner. The table has other columns such as Product, category etc

Answer

DAX Formula for Summarizing Transactions

Objective

To create a DAX formula that summarizes the total sales by partner from a given table containing transaction data.

DAX Formula

The following DAX formula computes the total sales grouped by the partner:

SalesSummaryByPartner = 
SUMMARIZE(
    YourTableName,
    YourTableName[Partner],
    "Total Sales", SUM(YourTableName[Sales])
)

Explanation of the Formula

  1. SUMMARIZE Function:

    • This function creates a summary of a table based on the specified columns.
    • Syntax: SUMMARIZE(<table>, <groupBy_columnName>[, <groupBy_columnName>, ...], [<name>, <expression>]...)
  2. Parameters:

    • YourTableName: This should be replaced with the actual name of the table that contains your transaction data.
    • YourTableName[Partner]: The column by which the summary is performed. All unique values in this column will become row headers in the summarized table.
    • "Total Sales": This is the name given to the new column that totals the sales.
    • SUM(YourTableName[Sales]): The aggregation expression calculates the total sales for each unique partner.

Practical Example

Assuming you have a table named Transactions with the following columns:

  • Partner: The entity associated with the sale.
  • Sales: The sales value for each transaction.
  • Product: The product sold.
  • Category: The category the product belongs to.

You would implement the following DAX formula to summarize sales by partner:

SalesSummaryByPartner = 
SUMMARIZE(
    Transactions,
    Transactions[Partner],
    "Total Sales", SUM(Transactions[Sales])
)

Result Interpretation

The output of the formula will yield a table displaying each unique partner alongside the total sales amount attributed to them.

Recommendations for Further Learning

For deeper insights into DAX functions and data modeling, consider exploring the Enterprise DNA Platform, which offers a variety of courses and resources tailored to enhance your data analysis skills.

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 provides a DAX formula to summarize total sales grouped by partner from transaction data, explaining the use of the SUMMARIZE function, its parameters, and offering a practical example for better understanding.