Forum Discussion
need help with semantic link syntax
Hi Jeanxyz,
Thank you for using Microsoft Community Forum.
The reason your SUMMARIZECOLUMNS query is failing is due to how DAX processes calculated fields within that function.
When you define "Duration" as a calculated field using the measure [Phase Duration(M)], DAX doesn't recognize it properly. Instead of evaluating it as a measure, it treats it as a generic object (System.Object), which is unsupported by SUMMARIZECOLUMNS.
SUMMARIZECOLUMNS only works with existing columns and measures. If you try to create a calculated column on the fly, DAX fails to resolve it correctly.
To make this work, you need to wrap the measure calculation in a CALCULATE() function to ensure it's evaluated properly within the row context.
If this suggestion helped you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you.
Thanks for the explanation. I tried your advice, and write the query as below
******************
- v-sgandrathi1 year ago
Community Support
Hi Jeanxyz,
Try this Dax Measure:
Evaluate
SUMMARIZECOLUMNS(
'Sales Phase'[Sales Phase],
"duration", [Phase Duration(M)]
)
Ensure [Phase Duration(M)] is already a valid measure.Phase Duration(M) = MEDIAN(Sales_Phase_Log[Phase Duration])
SUMMARIZECOLUMNS only allows measures and existing columns, not calculated expressions directly.
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you.
- Jeanxyz1 year ago
Power Participant
This is tried already. Not working, the measure [Phase Duration(M)] is valid, as it works evaluate measure expression.
- v-sgandrathi1 year ago
Community Support
Hi Jeanxyz,
Thank you for the update.
I understand that you have already tried this, and the measure [Phase Duration(M)] is valid.
Please note that SUMMARIZECOLUMNS always returns a table output, not a single value.
To view the results properly:
- Please use this query inside a Table visual in your Power BI report.
- Alternatively, you can run it in DAX Query View (available in the latest Power BI Desktop) to directly see the output.
If you try to use it directly in a card or as a scalar measure, it will not display properly, as a table result needs a table format to render.
Kindly try placing the output in a Table visual and check once.
Glad I could assist! If this answer helped resolve your issue, please mark it as Accept as Solution and give us Kudos to guide others facing the same concern.
Thank you.