The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I understand that the DAX function SUMMARIZE is deprecated and will eventually be removed.
What alternative function can be used instead?
SUMMARIZECOLUMNS seems like the obvious one, but unfortunately it does not work within context transitions, so is not very useful.
Solved! Go to Solution.
Hi @Anonymous
Are you referring to this from dax.guide?
It's not the whole SUMMARIZE function that's deprecated, just the ability to add new columns to the grouped table.
The recommended way to do that would be
ADDCOLUMNS(
SUMMARIZE(Table, Table[Column]),
"New Column Name", <Expression>
)
Hi @Anonymous
Are you referring to this from dax.guide?
It's not the whole SUMMARIZE function that's deprecated, just the ability to add new columns to the grouped table.
The recommended way to do that would be
ADDCOLUMNS(
SUMMARIZE(Table, Table[Column]),
"New Column Name", <Expression>
)
@Anonymous I wrote the code for your case:
Count Over 75 =
SUMX(
ADDCOLUMNS(
SUMMARIZE(
'FactTable',
'Employee'[EmpID],
'Employee'[StoreID],
'Project'[Project]
),
"_Over75", IF([MeasureOfInterest] >= 75, 1),
),
[_Over75]
)
@Anonymous who said SUMMARIZE is deprecated?
Do you have a reference for this announcement?
@SpartaBI , the relevant references are:
Solved: DAX: Who wants a challenge with SUMMARIZE? - Microsoft Power BI Community
But it appears that only part of the SUMMARIZE functionality is being depricated: the parameters to create columns and expressions.
So in my case, I would need to replace this existing DAX measure:
Count Over 75 =
SUMX(
SUMMARIZE(
'FactTable',
'Employee'[EmpID],
'Employee'[StoreID],
'Project'[Project],
"_Over75", IF([MeasureOfInterest] >= 75, 1)
),
[_Over75]
)
with this syntax:
Count Over 75 =
SUMX(
SUMMARIZE(
'FactTable',
'Employee'[EmpID],
'Employee'[StoreID],
'Project'[Project]
),
IF([MeasureOfInterest] >= 75, 1)
)
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |