Forum Discussion
DAX or Query: Compare two columns in different Tables
- 5 years ago
Hi Anonymous
here you go
Attached the file
https://drive.google.com/file/d/1hMWpl1vwwXlj8yDKT8vmXLUF7S207jUU/view?usp=sharing
- 5 years ago
Hey add this to the measure if you don<t want to count the Blank rows
Count of MisMatch = CALCULATE(COUNTROWS(OEC_Service_Requests) , OEC_Service_Requests[Match/No Match__] = "No Match", OEC_Service_Requests[Status_Code ESR] <> BLANK())
I just updated the file for you
Hi aj1973 unfortunatelty this didn't work 😞
The count is just giving me the count of all the rows in the 1st table not the new table created.
Also I have a change in requirement I need the 3rd table to show the order no, order status from both table 1 and 2, and new column to be created that shows when the Order status values in rows from each table match, as below:-
| Order No | Order Status (T1) | Order Status (T2) | Column 3 |
| 1234 | Open | Resolved | No Match |
| 1235 | Resolved | Pending | No Match |
| 1236 | Pending | Open | Match |
| 1237 | Resolved | Resolved | Match |
| 1238 | Resolved | Resolved | Match |
| 1239 | Open | Pending | No Match |
I am getting duplicate rows when I take both table columns however can see the match/no match values. whereas if I do your example way it shows me all values as no match
- aj19735 years agoCommunity Champion
Anonymous
How it is not working? what did you change? Can you send me the same file that is not showing the correct result?
I just updated the file using different way (Added all columns to Table 1). Check it out.
- Anonymous5 years agoNot applicable
link
- aj19735 years agoCommunity Champion
Here is your file corrected
I changed the way of calculation: I added 2 columns to OEC_ Table:
I renamed the "No need table" and "No need measure" delete them if you want.
Hope you like it😁