Forum Discussion
Calculated column from two different tables
- 9 years ago
Firstly, you need to get data from antoher table, and then devide values. To get data from another table, we cna use RELATED function and Lookupvalue function.
RELATED function returns a related value from another table.
https://msdn.microsoft.com/en-us/library/ee634202.aspxLookupvalue function returns the value in result_columnName for the row that meets all criteria specified by search_columnName and search_value.
https://msdn.microsoft.com/en-us/library/gg492170.aspxIf this is not what you want, please provide us some sample data and your expected result, so that we can make further analysis.
Regards,
Charlie Liao
Hello,
I am new to Power BI and DAX and I am facing some difficilties. I want to add a calculated column where I need to devide values from two different tables. Relationship between tables is Many to one (I suppose).
The syntax I write is the following:
ColumnName = DIVIDE('Table1[Stock], RELATEDTABLE('Table2)[RQTY])
Thanks in advance.
1. what issue are you facing exactly i.e what errors are you getting?
2. can you provide a screenshot of your relationship view?
3. do you need a calculated column or measure?