Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Relationship with Bridge table

Hi,

 

i have a problem of creating relationship with bridge table.

 

i have 2 database that have same column 'department'. i wanted to make a relationship to make a slicer. but it didn't let me have active relationship. so created Bridge table like below. but it still doesn't let me make relationship..!

 

what do i miss here??

 

  • parry2k's avatar
    parry2k
    6 years ago

    Anonymous change to this, double check table and column name, basically filter out blank values. Would appreciate Kudos 🙂 if my solution helped.

     

    Bridge Department =
    DISTINCT (
    UNION (
      CALCULTETABLE ( VALUES ( 'Date - Supply'[Department] ), 'Date - Supply'[Department] <> BLANK() ),
     CALCULTETABLE ( VALUES ( 'Date - Services'[Department] ), 'Date - Services'[Department] <> BLANK() ) 
    )
    )

     

14 Replies

  • Anonymous what happens if you try to make a relationship? Do you get any error? Make sure there is no blank/null value in bridge table.

     

    Would appreciate Kudos 🙂 if my solution helped.

    • parry2k's avatar
      parry2k
      Super User

      Anonymous based on slicer image, if it is from bridge table, seems like there is blank value and that is the issue. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks for your reply parry2k 

      it ask many to many both relationship for one and one for single relationship.

      and one of departments has blank. so in bridge table there is a blank..!

       

      how can i make a bridge without no take blank if it;s the problem?

       

      thanks,

       

       

      • parry2k's avatar
        parry2k
        Super User

        Anonymous how you are creating bridge table? 

  • Anonymous 

    Try like this

    distinct(union(all(table1[Department]),all(Department)))