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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Prodan
Frequent Visitor

Suspected referential integrity issue

Hi all,

 

I created a new SQL dabatase from scratch with two tables, sales and product, along with its corresponding relationship. There're no referential integrity violation between these tables whatsoever.

Prodan_0-1596550065922.png

 

If I import this database into Power BI desktop using direct query mode and evaluate the product table with VALUES function, it returns an extra blank row. Based on the official documentation, VALUES only returns an extra blank value when a referential integrity violation is present, however, this is not the case. The issue can also be reproduced using the slicer visualization, which executes a VALUES function in the background.

 

Prodan_1-1596550110604.png

Prodan_2-1596550154124.png

 

The only way I found to fix this was to select the "Assume referential integrity" option when setting up the relationship between the tables in Power BI Desktop. Switching to import mode also fixes the issue. As far as I know, these configurations have nothing to do with fixing referential integrity issues but they solved my problem somehow.

Any ideas on why this is happening?

4 REPLIES 4
amitchandak
Super User
Super User

@Prodan , if there is any product in the table which is missing in product chances are there you can get blank values. Do you have such a case ?

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak, There's no referential integrity violation between these two tables (if that's what you mean). You can check the content of them in the screenshot from my original message.

Greg_Deckler
Community Champion
Community Champion

@Prodan - How are those tables related? On what columns?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , they are related through the id and product_id column. See image below.

Prodan_1-1596551759745.png

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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