Forum Discussion
Add Column using value form another table
Hi Anonymous
If you have a 1 to many relationship between Timezone (1) and Table [A] (many)
You can add a calcualted column on Table [A] using syntax like. Just replace the Value with your own column.
New Column = RELATED(TimeZone[Value])
Hi Phil,
Currently both tables are independant and is NO RELATIONSHIP between them.
Therefore I cannot use the RELATED DAX function.
Do I have to create a relationship?
- Phil_Seamark9 years ago
Microsoft Employee
Hi Anonymous
It will be easier if you can create a relationship. Is there any reason why you can't?
- Phil_Seamark9 years ago
Microsoft Employee
But here is an alternative that doesn't use relationships. My TableA has an [ID] column which I use to lookup an [ID] column in the TimeZone table
New Column = var JoinCol = 'TableA'[ID] var NewCol = CALCULATE(MAX('TimeZone'[Value]),'TimeZone'[ID]=JoinCol) return NewCol- Anonymous9 years agoNot applicable
Hi Phil,
Thanks for the rpsonses.
My table TimeZone only has one value - 10.
I don't see creating a relationship for this table is the best solution and it seems quite silly to do so.
Why can't I use this value as a parameter and then refer to it when I add my new column in Table [A]?