The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Team
I have two tables that I need to combine based on a year criteria.
Table 1 shows the number or items sold during certain year, and the Table 2 is the database created after 2019 that contains the list of items sold sice 2019.
Table 1
Year | Number |
2016 | 5 |
2017 | 8 |
2018 | 10 |
Table 2
Date | Ref |
12/May/2019 | 10 |
13/Apr/2019 | 11 |
1/Oct/2019 | 10 |
8/Jun/2020 | 1 |
10/Jan/2021 | 07 |
10/Jun/2021 | 10 |
I need to create a table that will fetch the data in the column Number from the table 1 for the years 2016 to 2018 and for 2019 and forward the sum of the number of items sold during those years.
Result
Year | # Articles sold |
2016 | 5 |
2017 | 8 |
2018 | 10 |
2019 | 3 |
2020 | 1 |
2021 | 2 |
Thanks a lot for your help
Solved! Go to Solution.
Hi,
This is my solution :
1- In Table 2 I create the Year column based on the date column in Power Query :
2- Append 2 tables and delete :
3- Create the below measure in new table :
Thanks for Kudos and please mark it as solution if it helps
Hi,
This is my solution :
1- In Table 2 I create the Year column based on the date column in Power Query :
2- Append 2 tables and delete :
3- Create the below measure in new table :
Thanks for Kudos and please mark it as solution if it helps
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
30 |
User | Count |
---|---|
96 | |
75 | |
67 | |
52 | |
52 |