Hey all,
The DAX formula
SUMX(
SUMMARIZECOLUMNS(
dates[Date],
"@Sales",
[Sales Total]
),
[@Sales]
)
returns the following error
“mdxscript(model) (184, 5) calculation error in measure …
Summarisecolumns and addmissingitems may not be used in this context”
if displayed in a table with the dates context.
My other measure works fine with what i am wanting to achieve:
SUMX(
ADDCOLUMNS(
SUMMARIZE(
dates,
Dates[Date]
),
"@Sales",
if(
[Sales Total] = BLANK(),
0,
[Sales Total]
)
),
[@Sales]
)
I have tried to do it with SUMMARIZE COLUMNS because I read an article on SQLBI (https://www.sqlbi.com/articles/introducing-summarizecolumns/) that was saying that SUMMARIZE is like an old function that is being deprecated and SUMMARIZE COLUMNS should be used instead. But I get an error when trying to use it.
I also searched around, found this previous help topic but it doesn’t really explain why it’s happening.
I’ve attached my demo file, sheet is “summarise error” (1st sheet)
Mock Data PBI.pbix (1.5 MB)
I know that the summarise function works but I really want to know why the error comes up in summarize columns, it appears that the new “funky” summarize function doesn’t work like the old one
Any help is appreciated.
Thanks,
Tim