Forum Discussion
How to filter rows in a table based on rows in another table that has been filtered
hello jasonbakersd,
When you say In my two tables Member ID is not unique..., do mean that 'Table 1'[Member ID] does not equal 'Table 2'[Member ID] or in other words 'Table 1' value of Dozer is not the same as 'Table 2' value of Dozer?
Or do you mean that you have mulitple Dozer's in either table and a relationship can't be built because their are duplicate values of Dozer?
My guess is you need to build a 'lookup table' of unique [Member ID] then build the relationship between the 'Table 1'[Member ID] (Many:1) -> 'lkupTable'[Member ID] <- (1:Many) 'Table 2'[Member ID]
- jasonbakersd8 years ago
Helper I
Tables 1 & 2 have many member ID so it would be a many to many relationship.
There is a member table with relationships to both tables.
- ChrisMendoza8 years ago
Resident Rockstar
How about Merging the two tables? I chose LEFTOUTER, you may require different with your actual data.
- jasonbakersd8 years ago
Helper I
These are claims files for Medical and Pharmacy claims.
These are fact tables that span 5 years of data and store data different grains so merging isn't an option.The requrirements are simple.
Get members from Pharmacy table that have a specific value.
Use that member group to filter the medical claims to get medical spend and other slices of information.
I've got some Market Basket like measures that do subset filtering on one table, it's just working out the DAX to get the 2nd part of the requirement.