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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
gopala000
Frequent Visitor

Relation with null value for dimension key in fact table errors on creating a report

I have a 1:N between a dimension table and fact table in Fabric LakeHouse. Note that some fact records may have null value for the dimension key. I created a many to one relation between fact and dimension in the semantic model with "assume referential integrity" checkbox turned off.  When I created a report with columns from the fact and dimension table, I get the error below. How do I define the semantic model for such a relationship? Is there any PowerBI setting that needs to suppress the error validation?

 

Column '<oii>UserId</oii>' in Table '<oii>userfact</oii>' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.
Please try again later or contact support. If you contact support, please provide these details.
Hide details
Activity ID8d78974e-d77b-4833-982e-1df50b7edf01
Request IDeb080e40-77d4-cd8e-923b-10518a89b45d
Correlation IDd292750d-d049-4515-1d9b-a264fb127bd7
TimeTue Jan 21 2025 19:32:55 GMT-0800 (Pacific Standard Time)
Service version13.0.24945.38
Client version2412.3.22264-train
Cluster URIhttps://wabi-us-west2-redirect.analysis.windows.net/

1 ACCEPTED SOLUTION
gopala000
Frequent Visitor

I solved the issue by changing the dimension key from null value to empty string and the error went away. Other option that I tried and that worked was to create a dimension record called "Not Applicable" and use that primary key instead of null in the Fact table.

View solution in original post

2 REPLIES 2
v-kpoloju-msft
Community Support
Community Support

Hi @gopala000,

 

May I ask if you have resolved this issue? If so, please mark it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

 

Thank you.

gopala000
Frequent Visitor

I solved the issue by changing the dimension key from null value to empty string and the error went away. Other option that I tried and that worked was to create a dimension record called "Not Applicable" and use that primary key instead of null in the Fact table.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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