Forum Discussion
blackbach2728
2 years agoNew Member
Compare data from two different table visuals that exist from different data sources
I have two table visuals that I have created in a dashboard in two seperate pages. This data is from two different data sources that I connected to by direct query. I need a count of how many records...
- Anonymous2 years ago
Please try this:
Here are 2 sample data:Table A:
Table B:
Click Transform data in the Home pane to use power query.
Click Custom Column in the Add Column pane:
You can use this m-code to get numbers from columns:
Text.Select([Value],{"0".."9","."})Add for both 2 tables:
Close&Apply.
Finally, add a measure:
MEASURE = COUNTROWS ( FILTER ( CROSSJOIN ( 'Table A', 'Table B' ), 'Table A'[Custom] = 'Table B'[Custom] ) )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
danextian
Super User
2 years ago
You can do an intersect between the two columns from tables A and B
COUNTROWS ( INTERSECT ( VALUES ( table1[value] ), VALUES ( table2[value] ) ) )
But both columns must contain numbers only. While that can be done in Power Query, that will most likely break query folding as welll, breaking direct query.