# 7.11 Merge Columns: text एकत्र जोडा

Source: https://ravindrabagale.com/mr/powerbi/ch07-data-cleaning-a-z-in-power-query/7-11-merge-columns.html
Language: mr (Marathi with English technical terms)

Merge Columns अनेक columns मधला text एका column मध्ये जोडतो. हा tables चा Merge Queries नाही.

 | Area
 | City
 | State

 | Kothrud
 | Pune
 | Maharashtra

 | Dharampeth
 | Nagpur
 | Maharashtra

 | Nirala Bazar
 | Sambhaji Nagar
 | Maharashtra

 | Store Location

 | Kothrud, Pune, Maharashtra

 | Dharampeth, Nagpur, Maharashtra

 | Nirala Bazar, Sambhaji Nagar, Maharashtra

Ctrl धरून Area, City, State या क्रमाने columns निवडा.

Add Column › Merge Columns मूळ columns ठेवतो; Transform › Merge Columns त्यांना replace करतो.

Custom separator मध्ये comma आणि space द्या: , . नवीन नाव Store Location द्या.

Merged = Table.AddColumn(Source, "Store Location",
    each Text.Combine({[Area], [City], [State]}, ", "), type text)

Text.Combine list मधले nulls skip करतो. पण [Area] & ", " & [City] मध्ये एक value null असेल तर result null होऊ शकतो.

Practice

DarkStore मध्ये City, Maharashtra, India असा Map Location column बनवा. Chapter 15 मधल्या map साठी तो उपयोगी पडेल.

रवींद्र बागले यांची tip

Nulls आणि रिकाम्या strings चा परिणाम तपासा; अनावश्यक separators येऊ शकतात. Merged result तपासेपर्यंत मूळ columns ठेवलेले बरे.
