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.
Hello All ,
I have 1 table which is appended by two other table.
on that table i have one column A. , 2nd column B ( It is a calulative column ) and 3rd column C . please tell me how i'll get B and C into same column against A column .
A B C
addchdj 1 4
ahsdjddc 2 2
scjdjdec 3 3
Output should be
A B C D
addchdj 1 4 1
ahsdjddc 2 2 2
scjdjdec 3 3 3
addchdj null null 4
Solved! Go to Solution.
Hi @singhpratiksha8,
Add a new column in original table.
D = 'Test Tb1'[B]
Create a calculated table.
Test Tb2 = ADDCOLUMNS ( EXCEPT ( VALUES ( 'Test Tb1'[C] ), VALUES ( 'Test Tb1'[B] ) ), "A", LOOKUPVALUE ( 'Test Tb1'[A], 'Test Tb1'[C], [C] ) )
Union above two tables to get the result output.
Test Tb3 = UNION ( 'Test Tb1', SELECTCOLUMNS ( 'Test Tb2', "A", 'Test Tb2'[A], "B", BLANK (), "C", BLANK (), "D", 'Test Tb2'[C] ) )
Best regards,
Yuliana Gu
Hi @singhpratiksha8,
Add a new column in original table.
D = 'Test Tb1'[B]
Create a calculated table.
Test Tb2 = ADDCOLUMNS ( EXCEPT ( VALUES ( 'Test Tb1'[C] ), VALUES ( 'Test Tb1'[B] ) ), "A", LOOKUPVALUE ( 'Test Tb1'[A], 'Test Tb1'[C], [C] ) )
Union above two tables to get the result output.
Test Tb3 = UNION ( 'Test Tb1', SELECTCOLUMNS ( 'Test Tb2', "A", 'Test Tb2'[A], "B", BLANK (), "C", BLANK (), "D", 'Test Tb2'[C] ) )
Best regards,
Yuliana Gu
Try to add a calculated column
[column B]&[column C]
you can add space [column B]&" "&[column C] or similar.
Best regards
@Floriankx it will concatenate ,i need B after C .... In one column
A B C
addchdj 1 4
ahsdjddc 2 2
scjdjdec 3 3
Output should be
A B C D
addchdj 1 4 1
ahsdjddc 2 2 2
scjdjdec 3 3 3
addchdj null null 4
If you had the possibility to calculate the column in PowerQuery you could just add two additional columns (if you want to keep B and C) and unpivot them.
This would probably the easiest way.
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |