Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
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:
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 50 | |
| 44 | |
| 44 | |
| 19 | |
| 19 |
| User | Count |
|---|---|
| 71 | |
| 70 | |
| 34 | |
| 33 | |
| 31 |