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] ) )
AlwaysStuck
8 years agoNew Member
I'm trying to do a similar thing but can't get the formula you provided to work.
I have two tables and want to subtract Column A from Table 1 from Column B from Table 2. There is a relationship between the two tables via a common ID.
The relationship is one to many whereby the value being subtracted is the 'one table' and the one from which data is being subtracted from, is the 'many table'.
The data is in date format.
i.e 05/03/2017 - 03/03/2017 = 2
Any help appreciated.
Thanks
Ashish_Mathur
8 years agoSuper User
Hi,
Share the link from where i can download your file.