Forum Discussion

alks_skla_f's avatar
alks_skla_f
Helper II
1 year ago
Solved

Star schema: table visualization fails

Hello, I am quite new in PBI. I was trying to create a star schema from wide table. I have a fact table: fact_Bookings = VAR dataframe = ADDCOLUMNS( nsp_contract_report, ...
  • Anonymous's avatar
    Anonymous
    1 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.