Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
singhpratiksha8
Frequent Visitor

How to combine one calculative column and one exiting column from same table?

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

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @singhpratiksha8,

 

Add a new column in original table.

D = 'Test Tb1'[B]

1.PNG

 

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] )
)

2.PNG

 

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]
    )
)

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @singhpratiksha8,

 

Add a new column in original table.

D = 'Test Tb1'[B]

1.PNG

 

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] )
)

2.PNG

 

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]
    )
)

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Floriankx
Solution Sage
Solution Sage

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.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors