Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, I have a semantic model built using tables from a Fabric Warehouse.
I am attempting to create a relationship between two fields which both show as being integer fields, but when I try to create the relationship, I get this error:
The operation is not allowed because the data types of Direct Lake relationship between foreign key column 'JT_TASK'[WO No](Double) and primary key column 'WORK_ORDER'[WO No](Int64) are incompatible.
I have checked and double checked and both are set up as Int64 integer fields. Any ideas why this is happening?
Solved! Go to Solution.
Hi @Dataslug
This happens because even though both look like integers, one column is actually stored as Double and the other as Int64 in Direct Lake. Relationship needs the exact same type.
Fix:
Make both columns the same type at source (e.g., BIGINT), or use a view with CAST([WO No] AS BIGINT).
Refresh schema in the model and then create the relationship.
If you can’t change the source, use Import mode instead and set both as Whole Number.
Thank you @rohit1991
Just to be clear to others who may experience this, I did open up the gen2 dataflow, refresh the schema for the destination, and republish it. I then opened the semantic model I had built, and used the botton at the top to "Edit Tables". This allowed me to refresh. Once I did this, I was able to set up the relationship.
Hi @Dataslug
This happens because even though both look like integers, one column is actually stored as Double and the other as Int64 in Direct Lake. Relationship needs the exact same type.
Fix:
Make both columns the same type at source (e.g., BIGINT), or use a view with CAST([WO No] AS BIGINT).
Refresh schema in the model and then create the relationship.
If you can’t change the source, use Import mode instead and set both as Whole Number.