Forum Discussion
compare columns in two tables with same column names
- 9 years ago
Hi pxg08680,
According to your description above, you should be able to use the formula below to create a new measure and show it on the report to get the actual difference. :smileyhappy:
Diff = SUM ( CommercialBuyIntentVisits[MetricValue] ) - SUM ( CubeData[CommercialBuyIntentVisits] )Regards
Hi pxg08680,
both the tables are related using the data field.
For example, Column1 in TableA and Column1 in TableB are same and for getting the difference i tried tha dax query Diff= TableA[column1] - TableB[column1] and i have been getting errors and even if it executes I am getting incorrect values.
What's the relationship between TableA and TableB(One to One, or One to Many, or Many to One)?
If there is a (One to One, Many to One) relationship between TableA and TableB, then you should be able to use the formula below to create a new calculate column in TableA to calculate the difference.
Diff = TableA[column1] - RELATED ( TableB[column1] )
Regards
Hi , Thank You for the reply.
I have tried this a couple of times and I dont see the data is matching. I was getting different values than the expected ones.
My data is related on many-one relationship. I have related my data on a DATE column. For more info one of my table has 9 columns and other table has 15 columns. Does that matter..