Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I want to combine two tables by including all values. Below I represented it with sample data on how I want to have the table.
Table1:
Date | Unit | Subunit | Value1 |
05.2021 | A | A1 | 10 |
05.2021 | A | A2 | 12 |
06.2021 | B | B2 | 22 |
Table2:
DateUnitSubUnitValue2
Date | Unit | Subunit | Value2 |
05.2021 | B | B1 | 30 |
06.2021 | B | B1 | 20 |
06.2021 | B | B2 | 22 |
Joined Table should be:
Date | Unit | Subunit | Value2 | Value1 |
05.2021 | B | B1 | 30 | |
06.2021 | B | B1 | 20 | |
06.2021 | B | B2 | 22 | |
05.2021 | A | A1 | 10 | |
05.2021 | A | A2 | 12 | |
06.2021 | B | B2 | 22 |
How can I combine the data in this way? Thanks in advance!
Solved! Go to Solution.
After doing @NidhiBhusari solution you can use group by in Power Query Editor to give you desired result. As it will combine the same row and SUM all the values in Value1, Value2
Proud to be a Super User!
I tried that one but the table is not really the one I am looking for. If there is a value for matching data, I want to show them in the same row. For example, Unit:B, Date:06.2021 and Subunit:B2 is repeated value. How can I show them in the same row?
After doing @NidhiBhusari solution you can use group by in Power Query Editor to give you desired result. As it will combine the same row and SUM all the values in Value1, Value2
Proud to be a Super User!
You can use Merge Queries in Power Query Editor to combine data
https://www.c-sharpcorner.com/article/merge-two-tables-in-power-bi/
https://blog.enterprisedna.co/how-to-merge-queries-in-power-bi/
Proud to be a Super User!
Hi, Thanks for the answer, but it doesn't work when the columns date, unit and subunit don't match exactly. It gives the following result:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |