Forum Discussion

Bhanu_chPBI's avatar
Bhanu_chPBI
Helper I
4 years ago

Data Modeling.

Im new to power bi actually i created bridge table using dax column for two diff tables using below function.

Bridge table = DISTINCT(UNION(ALL(Table1[Date]),ALL(Table2[Date])). to over come Many to Many relationship.
upto here it's fine. is it possible to add another table date column in same bridge table. 

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Bhanu_chPBI what do you mean by adding the column from another table?

    Do you want to do the union of that column or add as a new column in this bridge table ?

    If you want as a new column, what is the joining condition that you have between the tables?

    • Bhanu_chPBI's avatar
      Bhanu_chPBI
      Helper I

      Hi Anonymous 

       

      Actually I have add the screen shot for your reference below.

       

      Did you see combined usage details table to bridge table iam getting one to one and cross filter direction as both. actually what i tried to do is i create date column in combined usage details and connected to bridge table but i didn't add the column data in bridge table. in top three table we have only date table to gave relationship there is no other columns to gave relationship. so the main thing is I need to get proper relationship for three tables into bridge table and another point to mention in combined usage we don't have repeted date so, how can i get combined usage date column into bridge table.

      • Bhanu_chPBI's avatar
        Bhanu_chPBI
        Helper I

        Pls let me help how to get proper relationship. and this this entair report is filtering based on bridge date column.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Bhanu_chPBI ,

     

    Please use the following Dax to create a bridge table.

     

    Table = 
    DISTINCT (
        UNION (
            UNION ( DISTINCT ( Table1[Date] ), DISTINCT ( Table2[Date] ) ),
            DISTINCT ( Table3[Date] )
        )
    )

     

    The PBIX file is attached for reference.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data

    • Bhanu_chPBI's avatar
      Bhanu_chPBI
      Helper I

      Hi Anonymous ,

       

      Thank's a lot for your valuble response. and actually i need one more dought like if we don't have repeated date values in third table which function we need to use according to your dax function.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Bhanu_chPBI ,

         

        Are you think in terms of performance? Here I use the DISTINCT function because I want to return a single column table. If there are no duplicate entries in the date column of Table 3, you can also use the ALL function here, which is a table function that also returns a single column of the table.

        Table = 
        DISTINCT (
            UNION (
                UNION ( DISTINCT ( Table1[Date] ), DISTINCT ( Table2[Date] ) ),
                ALL('Table3'[Date])
            )
        )

        Best Regards,
        Gao

        Community Support Team

         

        If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

        How to get your questions answered quickly -- How to provide sample data