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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors