Language Translator | DAX

DAX Summary Table

This DAX code uses SUMMARIZECOLUMNS to group by Product Category and Subcategory, calculating Total Sales and Average Quantity for each group in a summary table.


Empty image or helper icon

Prompt

EVALUATE
SUMMARIZECOLUMNS (
    'Product'[Category],
    'Product'[Subcategory],
    "Total Sales", SUM('Sales'[Amount]),
    "Average Quantity", AVERAGE('Sales'[Quantity])
)

Answer

Translated DAX Code:

EVALUATE
SUMMARIZECOLUMNS (
    Product[Category],
    Product[Subcategory],
    "Total Sales", SUM(Sales[Amount]),
    "Average Quantity", AVERAGE(Sales[Quantity])
)

Main Points:

  • In the DAX code, we use the SUMMARIZECOLUMNS function to create a summary table.
  • We specify the columns to group by within the SUMMARIZECOLUMNS function, which are Product[Category] and Product[Subcategory].
  • The sum of 'Sales'[Amount] is calculated for each group using SUM(Sales[Amount]).
  • The average of 'Sales'[Quantity] is calculated for each group using AVERAGE(Sales[Quantity]).
  • The result is presented with columns for 'Category', 'Subcategory', 'Total Sales', and 'Average Quantity'.

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 DAX code uses SUMMARIZECOLUMNS to group by Product Category and Subcategory, calculating Total Sales and Average Quantity for each group in a summary table.