Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Daveed1973
Advocate II
Advocate II

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.

1 ACCEPTED SOLUTION
Daveed1973
Advocate II
Advocate II

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.

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@Daveed1973,

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

Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Daveed1973
Advocate II
Advocate II

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.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.