Forum Discussion
GCGradwell
10 years agoHelper I
Create a Calculated Column from Different Tables
Hi , I can’t work out how to create a calculated column using 2 columns from different tables in the formula. I’m trying to create a calculated column ‘Z’ using a simple formula: X – Y Co...
- 10 years ago
Based on my understanding, it depends on the relationship.
If 1:1, below formula should work.
calculated column = table1[X] - RELATED ( table2[Y] )
If 1:many, the following formula should work.
calculated column = oneTable[X] - CALCULATE ( SUM ( manyTable[Y] ), ALLEXCEPT ( manyTable, Table10[linkedCol] ) )
MattAllington
10 years agoCommunity Champion
You are asking very general questions, so it is hard to know what you are trying to do, or why. My experience is that most calculated columns that new users try to build are completetly un-necessary and probably worse still - it normally is the wrong approach. Read my article here, then see if you can do what you want with measures.
http://exceleratorbi.com.au/calculated-columns-vs-measures-dax/