cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
IrenaG Frequent Visitor
Frequent Visitor

merge queries

Hello, I have 3 tables: 

In table 1 I have the sum price of the product that name is 'ORANGE". The number of product is 201619038.

 namenumbersum
orange20161903895,608.13

In table 2 I have the sum price of the same product that name  'ORANGE" but it appears in two lines. The total result is the same 95,608.13.

namenumbersum
orange9639566591,575.50
orange9678444,032.63
total 95,608.13

In table 3 I have Conversion Table for number of product:

namethe number in table 1the number in table 2
orange20161903896395665
orange201619038967844
The question is: how can I do the merge of table 1 & 2 if I have to get to the result like this:
 name  from table 1numbersum  from table 2 numbersumdifference
orange20161903895,608.139639566591,575.504,032.63
orange201619038 9678444,032.63-4,032.63

Thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
IrenaG Frequent Visitor
Frequent Visitor

Re: merge queries

thank you, I will try to fix it

View solution in original post

2 REPLIES 2
Ross73312 Super Contributor
Super Contributor

Re: merge queries

The short answer is you can't get exactly what you described in your last entry.  You can get a table that is pretty close, but the Sum column will repeat.

 

The best you could do is start with Table 3 and merge in the contents of 1 and 2.

 

Alternatively you could bring all 3 tables into Power BI and create relationships from 3 -> 1 and 3 -> 2, then build the table inside your visuals instead, using Table 3 as the row headers.


   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


IrenaG Frequent Visitor
Frequent Visitor

Re: merge queries

thank you, I will try to fix it

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors