Forum Discussion
Identifying mismatches between two tables
Hi there,
I have two tables of data in a very simple model. Table 1 (Product Agreed) has company name and products agreed, and Table 2 (Product Sold) has company name and products sold. The key between them is a GUID where Products Agreed is 1 (unique) and Products Sold is many.
Naturally, the relationship between the tables will only return matches.
However. I need to show where product agreed does NOT match product sold.
How do I go about this?
Hi JemmaD ,
Although it is not that much clear if you have any slicer or not. but lets assume that you dont have any slicer and just want to find products that agreed but not sold. then you can write a measure as follows:
measure not_sold :=
var _agreed= values (product_agreed [GUID])
var _sold = values (product_sold [GUID])
return
countrows ( except (_agreed, _sold))
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly.
1 Reply
- Selva-SalimiSolution Sage
Hi JemmaD ,
Although it is not that much clear if you have any slicer or not. but lets assume that you dont have any slicer and just want to find products that agreed but not sold. then you can write a measure as follows:
measure not_sold :=
var _agreed= values (product_agreed [GUID])
var _sold = values (product_sold [GUID])
return
countrows ( except (_agreed, _sold))
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly.