Forum Discussion
SUMX(VALUES(column), [Measure]) returns parent-level value, while ADDCOLUMNS/SUMMARIZECOLUMNS works
- 4 months ago
I found the root cause.
The issue was caused by the semantic model setting Value filter behavior. In my case, this setting changed how filters were evaluated in the visual context, which is why SUMX(VALUES(...), [Measure]) produced unexpected parent-level repeated values.
This also explains why:
- adding hierarchy columns changed the result
- alternative patterns such as ADDCOLUMNS / SUMMARIZECOLUMNS behaved differently
So the problem was not the base measure itself, but the semantic model's Value filter behavior setting.
Here`s the documentation.I'm mistaken. The default value hasn't changed. I remember it's changed.I can't believe it's still on the preview
Work with value filter behavior in Power BI - Power BI | Microsoft Learn
B & C:
SUMX iterates over VALUES(dim_reportingline[mr]) but the measure evaluates against the outer visual filter context rather than each iterated row, because the column is already filtered externally and the implicit context transition has nothing new to apply.
D & E:
ADDCOLUMNS and SUMMARIZECOLUMNS materialize the measure value per MR row eagerly during table construction, before the outer SUMX iterates, so each value is correctly scoped to its MR before any outer context can interfere.
DAX Studio Query Plan is the right tool, you could compare the LogicalQueryPlan nodes between Test 2 and Test 4.