Forum Discussion
Star schema: table visualization fails
- Anonymous1 year ago
Hi alks_skla_f ,
Thank you for reaching out on the Microsoft Fabric Community Forum.
Also, thanks to lbendlin for the prompt and helpful response.
Here are a few key checks and resolutions to help troubleshoot the issue
Mismatch in Data Types
Check: Ensure FK_line in fact_Bookings and PK in bridge_Line are of the same data type.Fix: If not, use INT() or VALUE() to convert during column creation or in Power Query.
PK Not Unique in dim_Line
Check: PK must be unique in bridge_Line to act as a primary key.Fix: Add this DAX measure in bridge_Line to check for duplicates:
PK_Duplicates =
CALCULATE(COUNTROWS('bridge_Line'), ALLEXCEPT('bridge_Line', 'bridge_Line'[PK]))Empty or Mismatched FK Values
Check: Confirm that FK_line in fact_Bookings actually contains values that exist in bridge_Line[PK].Fix: Use this DAX:
Missing_Lines =
EXCEPT(
VALUES('fact_Bookings'[FK_line]),
VALUES('bridge_Line'[PK])
)If you find our response helpful, we kindly request you to mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.
Thank you.
Your relationship is between dim and fact. "bridge_line" is likely not wired into that.
Consider doing all the normalization work in Power Query. Avoid bridge tables, they are not required in a well designed data model.