Forum Discussion
rishari
3 years agoFrequent Visitor
DAX Optimization SUMX ( SUMMARIZE ) - Performance Issue
I'm not able to optimize this measure. I'm new to Power BI DAX. Kindly suggest me a way to run this DAX faster. If I am wrong, please suggest me any other alternative way to achieve the below DAX ...
johnt75
3 years agoSuper User
Its not best practice to use SUMMARIZE to add calculated columns, its better to use ADDCOLUMNS, e.g.
MyMeasure =
SUMX (
ADDCOLUMNS (
SUMMARIZE (
'table_name',
'table_name'[Col1],
'table_name'[Col2],
'table_name'[col3],
'table_name'[col4],
'table_name'[col5]
),
"result",
CALCULATE (
DISTINCTCOUNTNOBLANK ( 'table_name'[col1] ),
FILTER ( 'table_name', SUM ( 'table_name'[Counter] ) = 1 )
)
),
[result]
)