Forum Discussion

balaji90540's avatar
balaji90540
New Member
9 years ago
Solved

Merge two tables

Hi, I have two merge two tables. In one table it contains Date and Cost Price on a daily basis. In next table, it contains Date and Margin on monthly basis.  I need to write a command so that, I can merge two tables and get an output as shown in the figure.

 

 

 

 

 

The margin value is on monthly basis, I need the same margin value to be entered on all the dates for that particular month. And i will create a new column and multiply Margin & Cost Price for my business use.

Can anyone guide me to bring the required Solution/Output in PowerBI?

 

 

  • Hi balaji90540,

     

    You can open Query Editor, click the Merge Queries as New to merge those two tables:

     

     

    Then expand the column to get below results:

     

     

     

    Click Fill -> Down get expected results.

     

    Create a custom column use formula below:

     

    For detail information, please download the attached pbix file to have a look.

     

     

    Best Regards,
    Qiuyun Yu

     

     

1 Reply

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

    Hi balaji90540,

     

    You can open Query Editor, click the Merge Queries as New to merge those two tables:

     

     

    Then expand the column to get below results:

     

     

     

    Click Fill -> Down get expected results.

     

    Create a custom column use formula below:

     

    For detail information, please download the attached pbix file to have a look.

     

     

    Best Regards,
    Qiuyun Yu