Forum Discussion
How to create query using data from existing tables in Power Query Editor
Hi Angela_Rom,
If I understand your requirement correctly that the table above is your desired output? If it is, more details would be better.
If it is convenient, please share your sample data which could reproduce the scenario such as the five different tables so that we could help further on it.
Best Regards,
Cherry
Hi Cherry,
Yes, the table above is my desired output. Below is the query I created. First, all the five tables were appended into one query using the Frcast data as the starting point. Then I grouped all transactions to produce the values as well as create a conditional column to create the different transactions.
The issue that I encountered by using the Frcast table as the starting point is that if a part number is not in the frcast query then I will not receive any data. I need the format to look like the table above and if there is no value than zero should populate for any of the transactions. This is when I realized that I need to tie my data using a date table so that data can be shown based on a 12 month view regardless of the value. Below is the list of the consolidated query with the appended five tables. Please let me know if you have any questions about the inforrmation. Thank you too for your help.
| Part # | Date | Transactions | Value |
| 7788 | 12/1/2017 | Frcast | 1.25 |
| 7788 | 12/1/2017 | Receipts | 500 |
| 7788 | 12/1/2017 | Turn-Ins | 100- |
| 9856 | 3/1/2018 | Receipts | 300 |
| 9856 | 3/1/2018 | Frcast | 2 |
| 9856 | 3/1/2018 | Receipts | 600- |
| 4598 | 5/1/2018 | Grossusg | 700- |
| 4598 | 5/1/2018 | Receipts | 400 |
| 1235 | 11/1/2018 | Receipts | 300 |
| 1235 | 11/12018 | Grossusg | 150 |