Forum Discussion
Summarize/Summarize Column Roll up
- Anonymous2 years ago
Hi Mkrishna ,
The ROLLUP function in DAX is used for creating subtotals and grand totals in a table. It's not specifically used in measures like SUMMARIZE or SUMMARIZECOLUMNS. Instead, it's typically used within the SUMMARIZE function to provide a way to include subtotals and grand totals in the result.
Such as below sample:
M = var a_ = SUMMARIZE ( test, ROLLUP ( test[Region], test[Country] ), "Total Sales", SUM ( test[Total Sales] ) ) RETURN CALCULATE(SUM(a[Total Sales1]))Rollup is generally not used in metrics tables or calculated columns.
This is because in visual, measure automatically calculates visual totals, including totals and sub-totals, based on the filtering context.result = CALCULATE(SUM(test[Total Sales]))Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Mkrishna ,
The ROLLUP function in DAX is used for creating subtotals and grand totals in a table. It's not specifically used in measures like SUMMARIZE or SUMMARIZECOLUMNS. Instead, it's typically used within the SUMMARIZE function to provide a way to include subtotals and grand totals in the result.
Such as below sample:
M =
var a_ =
SUMMARIZE (
test,
ROLLUP ( test[Region], test[Country] ),
"Total Sales", SUM ( test[Total Sales] )
)
RETURN CALCULATE(SUM(a[Total Sales1]))
Rollup is generally not used in metrics tables or calculated columns.
This is because in visual, measure automatically calculates visual totals, including totals and sub-totals, based on the filtering context.
result = CALCULATE(SUM(test[Total Sales]))
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.