Forum Discussion
Column comparing dates
Hi, JorgePereira
The value of a calculated column is computed during data refresh and uses the current row as a context; it does not depend on user activity on the pivot table. A measure operates on aggregations of data defined by the current context.
The measure uses SELECTEDVALUE function, which returns the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult. In a calculted column, there is no value for the column in the context. So it is blank.
I created some sample data. The pbix file is attached in the end.
Table:
Test:
There is no relationship between two tables. Here is the measure:
Measure:
Measure = SUM('Table'[S1])
Calculated Column:
Result = [Measure]
The 'Result' column is null because there is no context for calculate the measure.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.