Forum Discussion
Anonymous
9 years agoNot applicable
Add Column using value form another table
Hi, I have 2 tables: Table [A] TimeZone How do I add another colum in [A] that will use a column a vlaue in the TimeZone table without using a Merge Query? The Timezone table only co...
Phil_Seamark
Microsoft Employee
9 years agoHi 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])
- Anonymous9 years agoNot applicable
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