Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Create Relationship

I'm tring to create the relationship between two "description", i'm 100% sure the 'description' under "masterCategory-OfficeTools' is unique.  

plus why 'description' and 'Category' had Sum symbol at left? 

  • In the query editor there is a remove duplicates function when you import your data from excel.  Did you ever try using that?

     

    Also in excel are you checking for dups on just the one column or the two that look highlighted?

19 Replies

  • dkay84_PowerBI's avatar
    dkay84_PowerBI
    Microsoft Employee
    The symbol next to the fields means they are numeric data type with a default aggregation.

    If the MasterExport table is your fact table, try creating a new query by referencing it (right click "reference") and then add [Description] to the source line in the advanced editor or formula bar. Then trim and clean and then remove dups. Then try linking both original tables to this lookup table. You may have to change crossfiltering direction to both depending on how you want to work with the data.
  • Baskar's avatar
    Baskar
    Resident Rockstar

    Cool Dude,

     

     

    Change the Description Data Type to Text and Try.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Baskar i've changed both 'description' to text, but still give me same error message.  

  • As message says, seems like your both table have duplicate values, one has to be unique.

     

    Basically you cannot have many to many relationship, check your related to table if that contains duplicate values.

    • Anonymous's avatar
      Anonymous
      Not applicable

      parry2kYes, i know that.  1 table definitly have no duplicate, I've tried many ways, even delete the bottom rows to make sure no any blank values.  but still give me the same message.  i've done similar things, but don't have that problem before.   any other possiblity might caursing that error? thanks. 

      • dkay84_PowerBI's avatar
        dkay84_PowerBI
        Microsoft Employee

        1. In the query editor, reference your fact table[column]

        2. Convert to table

        3. Trim and Clean this column

        4. Remove dups

        5. Close and Apply

        6. Create relationship from your fact table to this dimension table and from this dimension table to your other table

         

        See if this allows you to build the relationship