Forum Discussion
Create a measure in query editor
Depends on which end of the relationship Table A is. If Table A is the many side then in a calculated column on Table A you can get a value from Table B using RELATED. If Table A is the one side then you would use RELATEDTABLE along with an iterator like MINX, MAXX.
I'm not able to use any of these formula it seems, although I have a one to many relationship established in the power query editor itself for a calculated column.
So for example, left table is my customer lookup, right table is my data table A.
I want the COGS column to be a calculation taking "Volume" from data table A * "Cogs Rate" from customer lookup.
The relationship is managed based on the Customer/Material unique key I have created.
Any ideas?
- johnt753 years ago
Super User
That should just be
COGS = 'Table A'[Volume] * RELATED ( 'Customer'[Cogs rate] )- nh273 years ago
Helper III
I just cannot seem to reference the Customer_Lookup table in this formula, only Table A, not sure why as the relationship is there in place.
- johnt753 years ago
Super User
Is it giving an error? If there are squiggly red lines in the formula bar it could just be Intellisense playing up.