Forum Discussion
Compare 2 tables easily - how do you do ?
LaurentZ - Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Ok, then
I've this table in Excel imported in Power Query as NEW:
| Scenario | Customer | Product | Quantity |
| Actuals | A | 1 | 5 |
| Actuals | B | 1 | 5 |
| Actuals | B | 2 | 1 |
I've this table in Excel imported in Power Query as OLD:
| Scenario | Customer | Product | Quantity |
| Forecast | A | 1 | 3 |
| Forecast | B | 2 | 2 |
First, I want a creation of a table by Power Query, giving me the difference between Tables NEW and OLD
| Scenario | Customer | Product | Quantity |
| Difference | A | 1 | 2 |
| Difference | B | 1 | 5 |
| Difference | B | 2 | -1 |
and finaly append those 3 tables to a final table:
| Scenario | Customer | Product | Quantity |
| Actuals | A | 1 | 5 |
| Actuals | B | 1 | 5 |
| Actuals | B | 2 | 1 |
| Forecast | A | 1 | 3 |
| Forecast | B | 2 | 2 |
| Difference | A | 1 | 2 |
| Difference | B | 1 | 5 |
| Difference | B | 2 | -1 |
How would you proceed ?
Note that this is very simplified, database are both >100,000 lines by tables and I've 18 columns of drivers for values (Quantity, turnover...)