Forum Discussion

Daveed1973's avatar
Daveed1973
Advocate II
9 years ago
Solved

Perform calculation on two different tables

I have two tables in Power BI Desktop...

 

Table1

Product   Site   QuantityA

Product1 Site1 100

Product2 Site2 200

Product3 Site3 300

 

Table2

Product   Site  QuantityB

Product1 Site1  4

Product2 Site2  20

Product3 Site3  37

 

I need to be able to perform a calculation where the products and sites from table1 that match in table2 are then calculated by QuanityA - QuantityB / QuantityA * 100.

 

Haven't a clue how to do this. Any help would be appreciated.

  • Okay, managed to do this without too much of a complicated calculation.

     

    I created a new merged table in Power BI Desktop which merged table 1 and table 2 together on the Product and Site columns. Then, as the QuantityA and Quantity B columns are now in the same table I was easily able to perform the calculation.

     

    Think I was trying to over complicate this originally.

2 Replies

  • Okay, managed to do this without too much of a complicated calculation.

     

    I created a new merged table in Power BI Desktop which merged table 1 and table 2 together on the Product and Site columns. Then, as the QuantityA and Quantity B columns are now in the same table I was easily able to perform the calculation.

     

    Think I was trying to over complicate this originally.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Daveed1973,

    Glad to hear the issue is solved. You can accept your reply as solution to close this thread.

    Regards,