Forum Discussion
Anonymous
4 years agoNot applicable
Create Calculated Column by dividing columns from two different TABLES
I want to create a calculated column by dividing columns from 2 tables linked with each other. It is giving me wrong answer. How to do this. Thanks in advance!
Anonymous
4 years agoNot applicable
TheoC Thanks for your patience. I am sharing the details.
Speed1 = SUM(Table2[Volume])/sum(Table1[Time])
Time = (DATEDIFF('Table1'[start time], 'Table1'[end time],SECOND))
These are two tables linked with each other on ID.If I divide using measure, it gives correct value but if I create a calculated column, it gives wrong value.
I don't know how to share the PBIX file with you.
- TheoC4 years agoCommunity Champion
Anonymous if there's a relationship using the IDs in both tables, then create following calculated columns:
colRelated = RELATED ( [Volume] ) // This brings the Volume column into the other table
colDivision = DIVIDE ( [Volume] , [Time] , 0 ) // This divides Volume by Time.
Hope this helps.
Theo