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 merge 2 Tables.
The Tables have the following structures:
Table A
Date Account No Account Level1 Level2 Amount
1.1.17 4100 Bla 1 Revenue Internal 100
5.2.17 4300 Bla 2 Revenue External 150
10.3.17 5700 Bla 3 Personal Workers -300
17.4.17 6300 Bla 4 Fixed C. Energy -200
Table B
Date Account No Account Level 1 Level 2 Amount Budget
31.1.17 Internal 110
28.2.17 External 160
31.3.17 Workers -350
30.4.17 Energy -120
I want to add the Budget for each Level 2 and Month to Table A.
I also tried to make a separate Table and create a Budget_ID with Month&Year&Level2 in both tables, but if there was no Amount in Level2 there would be no Budget too and if there are more than 1 etries in Level2 within a month, then i would get the Budget multiple times....
Hopefully you get my issue.
Solved! Go to Solution.
it turned out, that it was easier than I thought.
I didn't know that by appending queries I can also add columns. So the solution to my probelm was just to append Table B to Table A.
it turned out, that it was easier than I thought.
I didn't know that by appending queries I can also add columns. So the solution to my probelm was just to append Table B to Table A.
Hi @herbemischung,
Write the following calculated column formula in TableA
=LOOKUPVALUE(TableB[Budget],TableB[Level 2],[Level2],TableB[Date],EOMONTH([Date,0))
Hope this helps.
Hi @herbemischung,
To add the Budget for each Level 2 and Month to Table A, you can create a calculated column in Table A:
Budget = LOOKUPVALUE('Table B'[Budget],'Table B'[Level 2],'Table A'[Level2])
For your second question, can you show the desired results based on the sample data you provided?
Best Regards,
Qiuyun Yu
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |