Forum Discussion
Summarize
When we write summarize
Summarize( Sales, product[code], Customer[id],"Total", Sum(Sales(Qty))
When we add the new column in the summarize table, why isn't a calculate required??
HI Cyriackpazhe ,
When you add a new column in a summarize table, calaulate is not required because summarize inherently creates a row contextfor each group. Aggregation functions (like sum, Average, Count) naturally work within this row context.
Key Points
summarize Creates a Row Context for Groups
When you use summarize, it groups the table by the specified columns. For each group, the aggregations (like sum) are automatically evaluated in the context of that group.Implicit Context Handling
The aggregation functions in DAX, such as sum, are context-aware. In summarize, these functions automatically operate within the context of the grouped rows.If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thank you
Cyriackpazhe
If you need to modify the calculation then you need a CALCULATE otherwise, SUMMARIZE works based on the grouped rows without needing a context transition operation.
3 Replies
- vivek31Resolver II
HI Cyriackpazhe ,
When you add a new column in a summarize table, calaulate is not required because summarize inherently creates a row contextfor each group. Aggregation functions (like sum, Average, Count) naturally work within this row context.
Key Points
summarize Creates a Row Context for Groups
When you use summarize, it groups the table by the specified columns. For each group, the aggregations (like sum) are automatically evaluated in the context of that group.Implicit Context Handling
The aggregation functions in DAX, such as sum, are context-aware. In summarize, these functions automatically operate within the context of the grouped rows.If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thank you
- FowmySuper User
Cyriackpazhe
If you need to modify the calculation then you need a CALCULATE otherwise, SUMMARIZE works based on the grouped rows without needing a context transition operation.- AhmadBakrHelper IV
Hi,
Kindly have a look on this! In this example, SUMMARIZE did not create a row context based on the grouping column!
How SUMMARIZE works and does it create a row conte... - Microsoft Fabric Community