Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello How can I use power query to sum the total production per year including the production of each prouduct , as in the following table ?
Year | PRODUCT | TOTAL PRODUCTION | TOTAL PRODUCTION PER YEAR | ||||
2019 | A | 10 | 2019 | 212 | |||
2020 | A | 50 | 2020 | 115 | |||
2021 | A | 60 | 2021 | 130 | |||
2022 | A | 78 | 2022 | 261 | |||
2023 | A | 60 | 2023 | 594 | |||
2024 | A | 10 | 2024 | 84 | |||
2025 | A | 456 | 2025 | 476 | |||
2019 | B | 123 | |||||
2020 | B | 20 | |||||
2021 | B | 50 | |||||
2022 | B | 60 | |||||
2023 | B | 78 | |||||
2024 | B | 64 | |||||
2025 | B | 10 | |||||
2019 | C | 79 | |||||
2020 | C | 45 | |||||
2021 | C | 20 | |||||
2022 | C | 123 | |||||
2023 | C | 456 | |||||
2024 | C | 10 | |||||
2025 | C | 10 |
Solved! Go to Solution.
You can use GroupBy-->Groupby Year, Then aggregate by changing Operation to Sum and the column to Total Production.
You can use GroupBy-->Groupby Year, Then aggregate by changing Operation to Sum and the column to Total Production.