Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Yes, I read the article on going to the support site and submitting a bug report. I'm not a Pro user, so I don't get free support and I'm not about to charge my credit card to determine this is a bug and then have the charge refunded.
The Assume Referential Integrity option in the model does not work. I have 2 tables OrderHeader and Payment. They have a foreign key defined as OrderHeader.OrderID = Payment.OrderID. This foreign key is active and enforcing the relationship, so it is impossible to have a value in Payment.OrderID that does not exist in the OrderHeader table. However, when I select Assume Referential Integrity, I get an error back that there are rows in the Payment table that do not exist in the OrderHeader table. This is false.
The code that is being used is invalid to perform this type of check. It ran the following 3 queries:
SELECT
COUNT_BIG(*)
AS [a0]
FROM
(
(select [OrderID] as [OrderID],
--additional columns deleted
from [dbo.][OrderHeader] as [$Table])
)
AS [t1]
SELECT
COUNT_BIG(DISTINCT [t12].[OrderID])
AS [a0]
FROM
(
(select [PaymentID] as [PaymentID],
[OrderID] as [OrderID],
--additional columns deleted
from [dbo].[Payment] as [$Table])
)
AS [t12]
SELECT
COUNT_BIG(*)
AS [a0]
FROM
(
(select [OrderID] as [OrderID],
--additional rows deleted
from [OnlineSales].[OrderHeader] as [$Table])
)
AS [t1]
It appears that instead of checking to see if there are actually values in the Payment table that do not exist in the OrderHeader table, it is instead doing a pair of counts, comparing the values, and if they do not match, saying that there is no enforced referential integrity. This is invalid. This set of queries is saying that there MUST be a payment for EVERY value of OrderID. It does NOT say, there must be an OrderHeader.OrderID value for every Payment.OrderID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.