Two power queries have sales data: Current Year and Previous Years.
The current Year has 2021 data.
Previous Years has 2019 and 2020 data.
Columns: Sales Date, Sales, Units
Current Year:
Previous Years:
I want to compare 2021 sales to the previous year's sales.
How do I bring historical data from Previous Years PQ to Current Year PQ with added custom columns for each date?
For Current Year PQ, columns will be Sales Date, Sales, Units, 2019 Sales, 2019 Units, 2020 Sales, 2020 Units.
New PQ for Current Year: (shows 08-17-2021 for example)
I have very limited knowledge of Power Bi and PQ. This kind of situation can be taken care of in Excel with VLOOKUP and Index Match.
So, for the custom column 2019 Sales in Current Year PQ, what can be done to bring only 2019 sales value for every single date in 2021?
For example, for Aug 17, 2021, I want to bring Aug 17 2019 sales from Previous Years PQ.
Thank you for your help.
The current Year has 2021 data.
Previous Years has 2019 and 2020 data.
Columns: Sales Date, Sales, Units
Current Year:
Sales Date | Sales | Units |
08-11-2021 | 50000 | 1500 |
08-12-2021 | 45000 | 1200 |
08-13-2021 | 40000 | 1100 |
08-14-2021 | 42000 | 1150 |
08-15-2021 | 50000 | 1700 |
08-16-2021 | 52000 | 1750 |
08-17-2021 | 35000 | 800 |
08-18-2021 | 32000 | 700 |
Previous Years:
Sales Date | Sales | Units |
08-11-2019 | 30000 | 700 |
08-12-2019 | 35000 | 800 |
08-13-2019 | 25000 | 750 |
08-14-2019 | 27000 | 700 |
08-15-2019 | 26000 | 650 |
08-16-2019 | 20000 | 550 |
08-17-2019 | 18000 | 500 |
08-18-2019 | 20000 | 700 |
08-11-2020 | 22000 | 750 |
08-12-2020 | 28000 | 900 |
08-13-2020 | 23000 | 800 |
08-14-2020 | 22000 | 700 |
08-15-2020 | 18000 | 600 |
08-16-2020 | 19000 | 650 |
08-17-2020 | 20000 | 800 |
08-18-2020 | 18000 | 800 |
I want to compare 2021 sales to the previous year's sales.
How do I bring historical data from Previous Years PQ to Current Year PQ with added custom columns for each date?
For Current Year PQ, columns will be Sales Date, Sales, Units, 2019 Sales, 2019 Units, 2020 Sales, 2020 Units.
New PQ for Current Year: (shows 08-17-2021 for example)
Sales Date | Sales | Units | 2019 Sales | 2019 Units | 2020 Sales | 2020 Units |
08-17-2021 | 35000 | 800 | 18000 | 500 | 20000 | 800 |
I have very limited knowledge of Power Bi and PQ. This kind of situation can be taken care of in Excel with VLOOKUP and Index Match.
So, for the custom column 2019 Sales in Current Year PQ, what can be done to bring only 2019 sales value for every single date in 2021?
For example, for Aug 17, 2021, I want to bring Aug 17 2019 sales from Previous Years PQ.
Thank you for your help.