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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

BLANK in slicers in Composite Model - No way to assume referential integrity?

Please consider this painfully simple model...

1.png

 

The STORE and CALENDAR tables are DIRECTQUERY mode. The FACT_IMPORT table is IMPORT MODE.

I cannot modify the relationships to force referential integrity. It is grayed out.

1a.png

 

When I create slicers from my STORE and CALENDAR tables, I get (BLANK) as a value because I cannot assume RI in my composite model.

2.png

 

If I change the model to all IMPORT or all DIRECTQUERY, all's well. Import assumes RI by default, and DirectQuery actually lets you force RI.

3.png

 

Is this a bug or a feature? I'd like to be able to force RI in a composite model, because my data is pristine. But it cannot be done as far as I can see. I also don't see it as a known limitation in the documentation.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous - I think this is more classified as a "side-effect" of composite models that you can't enforce RI and it kind of makes sense why you cannot. In import mode, all the data is in the model so it knows if there is RI. In Direct Query, again, the RI is enforced at the database level. But for composite models, part of the data is in the model in import mode and part of it is in Direct Query (the source) which is not known until enumerated and it could change every enumeration theoretically so it cannot enforce RI.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Anonymous - I think this is more classified as a "side-effect" of composite models that you can't enforce RI and it kind of makes sense why you cannot. In import mode, all the data is in the model so it knows if there is RI. In Direct Query, again, the RI is enforced at the database level. But for composite models, part of the data is in the model in import mode and part of it is in Direct Query (the source) which is not known until enumerated and it could change every enumeration theoretically so it cannot enforce RI.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler Well said, and makes sense. Thanks!  Though, I still wish there was a "Just trust me" checkbox in the relationship properties between DirectQuery and Import mode tables. Maybe someday. 😁

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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