Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Merge Two Tables Creating Unique Table With No Duplicates

I am wanting to take two tables and create a new table that looks like the attached power bi file example. 

 

My desired new table will match every lease number with every station available. 

 

So Lease 1001 will be created into a table that will show the lease 5 times due to there being 5 stations in the report. 

 

If 6 stations were in the report it would add a 6th row. 

 

See link to PBIX file   PBIX File 

 

  • Hi, Anonymous 

    You can use CROSSJOIN  function to create a Calculated table to get the result you want. 

     

    Table = CROSSJOIN(Lease,Station)

     

    The result looks like this:

     

     

    Best Regards,

    Caiyun Zheng

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • v-cazheng-msft's avatar
    v-cazheng-msft
    Community Support

    Hi, Anonymous 

    You can use CROSSJOIN  function to create a Calculated table to get the result you want. 

     

    Table = CROSSJOIN(Lease,Station)

     

    The result looks like this:

     

     

    Best Regards,

    Caiyun Zheng

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Sorry forgot to add the link originally to the PBIX File.

     

    Here it is.   Link to PBIX