Forum Discussion
pxg08680
Resolver III
9 years agocompare columns in two tables with same column names
Hi Everyone, I have two tables A&B and have a column which is same in both the tables. I would like to compare the two columns and see if there is any difference between them and...
- 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
pxg08680
Resolver III
9 years ago
I did'nt get what this means.
Thanks
Phil_Seamark
Microsoft Employee
9 years agoHi there
Please try this. Does your Model table have a column called [CommercialBuyIntentVisits] which is also the same name that you have one of the tables?
TableC =
UNION(
EXCEPT(
SELECTCOLUMNS(CommercialBuyIntentVisits,"Col",[MetricValue]) ,
SELECTCOLUMNS('Model',"Col",[CommercialBuyIntentVisits])
),
EXCEPT(
SELECTCOLUMNS('Model',"Col",[CommercialBuyIntentVisits]) ,
SELECTCOLUMNS(CommercialBuyIntentVisits,"Col",[MetricValue])
)
)
- pxg086809 years ago
Resolver III
NewMeasure = IF(SUM(CubeData[CommercialBuyIntentVisits]) = SUM(CommercialBuyIntentVisits[MetricValue]), 1, 0)
I have used this dax query to find if there is any difference between the columns and represented it as 1 or 0, whic say yea or no. How do I get the difference in value like on 4/5/2017 I have a difference of 2.
Thank You