Forum Discussion
power bi deskstop - debug calculated column result different in daxstudio
- 2 years ago
Hey garythomannCoGC ,
there are two main differences when you try to debug the DAX code of calculated column using DAX Studio.
The most obvious difference is that using the DAX query pane in DAX Studio returns a table because of the required keyword EVALUATE whereas you are creating a scalar value when you are creating a CALCULATED COLUMN.
The 2nd difference when creating a calculated column is that you are starting from ROW CONTEXT.
For this reason it's necessary to use this pattern when you want to use DAX Studio:
EVALUATE ADDCOLUMNS( SUMMARUIZE( <name of the table where you want to create the CALCULATED COLUMN> , "name of the calculated column" , <your DAX code> ) )Hopefully, this helps to tackle your challenge.
Regards,
Tom
Hey garythomannCoGC ,
there are two main differences when you try to debug the DAX code of calculated column using DAX Studio.
The most obvious difference is that using the DAX query pane in DAX Studio returns a table because of the required keyword EVALUATE whereas you are creating a scalar value when you are creating a CALCULATED COLUMN.
The 2nd difference when creating a calculated column is that you are starting from ROW CONTEXT.
For this reason it's necessary to use this pattern when you want to use DAX Studio:
EVALUATE
ADDCOLUMNS(
SUMMARUIZE(
<name of the table where you want to create the CALCULATED COLUMN>
, "name of the calculated column"
, <your DAX code>
)
)
Hopefully, this helps to tackle your challenge.
Regards,
Tom