Forum Discussion
Iamnvt
5 years agoContinued Contributor
Convert a Measure to a Calculated Column
I have 2 disconnected tables:
ProductValueLookup Column
| A | 2 | ? |
| A | 3 | ? |
| B | 4 | ? |
| B | 5 | ? |
and
ProductValue2
| A | 3 |
| A | 2 |
| A | 2 |
| B | 1 |
I can create a measure to lookup and sum the value from Table 2 to Table 1:
Lookup Measure = CALCULATE(SUM(Table2[Value2]), TREATAS(VALUES(Table1[Product]), Table2[Product]))
How can I create a calculated column in Table 1 to have the same result as the measure above?
Here is the PBI file link: https://1drv.ms/u/s!Aps8poidQa5zmbVOuWoPQC_VC5yysw?e=XGeX4T
Thanks
Lookup Column = CALCULATE( SUM( Table2[Value2] ), TREATAS( { ( Table1[Product] ) }, Table2[Product] ) )
1 Reply
- CNENFRNLCommunity Champion
Lookup Column = CALCULATE( SUM( Table2[Value2] ), TREATAS( { ( Table1[Product] ) }, Table2[Product] ) )