Forum Discussion
Measure Causing my Table to Cross Join
Hi,
In my datamodel, I have a table named Site Details with Unique Site IDs, and I have my Master Data table (See Picture). I created a measure with a simple Switch statement, but it is causing my table to cross join. How do I fix it?
AF Label In Hand =
SWITCH(
SELECTEDVALUE('Master Data'[Site AF Label Required]),
"Yes", 1,
BLANK(), 0,
2
)
To clarify, the Site ID columns are: the first one is the Site Details[Site ID], second is Master Data[Site ID]
Thank you
4 Replies
- ajohnso2Solution Supplier
What is your join criteria and why do you have a blank value for site ID?
- AnonymousNot applicable
Site Details[Site ID] = Master Data[Site ID]
The Master Data have some Site IDs blank not the Site Details. The master data is mostly user input and the data quality is not so great.
- ajohnso2Solution Supplier
If your data quality is not great I would create a bridging table and cleanse the data as best as you can. Unique SiteID from Site details and Unique SiteID from Master Data and go from there
- AnonymousNot applicable
The Site IDs in the Master data should not be unique, the master data is unique by another column (Program ID). The relationship between Site Details and Master Data is one to many as in the picture