Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
AyubSherif
Frequent Visitor

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?

site.PNGt.PNG

 

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 4
ajohnso2
Super User
Super User

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

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

ajohnso2
Super User
Super User

What is your join criteria and why do you have a blank value for site ID?

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.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors