How to combine values from 2 columns

LINUS_MAASTOK

New Member
Joined
Oct 25, 2019
Messages
11
I everyone!
i have a problem, I want to create a single column from the combination of 2 others from diferent tables...
these columns have a null value or a numerical value, like this:

HTML:
COLUMN_TABLE1--COLUMN_TABLE2 ----- WANTED COLUMN_FROM_ANY_TABLE
(null)---------------(null)-----------------------(null)
(null)---------------8832-----------------------8832
2131----------------(null)----------------------2131
(null)----------------(null)---------------------(null)
3324-----------------3324---------------------3324
2232-----------------(null)---------------------2232

BTW, IM working on Power BI. Also, excuse me for my bad english uwu
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Is it POSSIBLE that you could have an entry like this ?

COLUMN_TABLE1--COLUMN_TABLE2
2131-------------8832

And if the answer is "YES", how do you want to handle it ?
 
Upvote 0
maybe
Table.AddIndexColumn(Table.RemoveColumns(Source,{"COLUMN_TABLE1"}), "Index", 1, 1)

Table.AddIndexColumn(Table.RemoveColumns(Source,{"COLUMN_TABLE2"}), "Index", 1, 1)

merge by Index
then double IF
 
Upvote 0
Assuming that your data is in Table1 and Table2

Code:
let
    Source = Table.FromColumns({List.Transform(List.Zip({Excel.CurrentWorkbook(){[Name="Tabela1"]}[Content][Column1], Excel.CurrentWorkbook(){[Name="Tabela2"]}[Content][Column1]}), each List.Max(_))})
in
    Source
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top