Forum Discussion
PradneshSP
3 years agoFrequent Visitor
Summarize function providing wrong results.
I'm trying to summarize a table to display values by month SUMMARIZE(Sales_View,Sales_View[Div],Sales_View[Code],Sales_View[Brands],Sales_View[Billing Month_Year],Sales_View[Type],"Value",SUM(S...
- 3 years ago
Don't use SUMMARIZE to add calculated columns, use ADDCOLUMNS instead
ADDCOLUMNS ( SUMMARIZE ( Sales_View, Sales_View[Div], Sales_View[Code], Sales_View[Brands], Sales_View[Billing Month_Year], Sales_View[Type] ), "Value", CALCULATE( SUM ( Sales_View[VALUE] ) ) )If you're interested, there's a SQL BI article about it.
johnt75
3 years agoSuper User
Don't use SUMMARIZE to add calculated columns, use ADDCOLUMNS instead
ADDCOLUMNS (
SUMMARIZE (
Sales_View,
Sales_View[Div],
Sales_View[Code],
Sales_View[Brands],
Sales_View[Billing Month_Year],
Sales_View[Type]
),
"Value", CALCULATE( SUM ( Sales_View[VALUE] ) )
)
If you're interested, there's a SQL BI article about it.