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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
colmac
Regular Visitor

Help with Splitting a column

Wonder if someone can help a complete Newb at Power Query.

 

I'm trying to analyse several years worth of banking data. I need to allocate a spending type to each payee. The payee description field is particularly unhelpful, but much of it follows 2 main patterns.

 

The first has simply a text entry for the company name eg Ebay Sarl, Paypal etc (see attached image (after split into 2 columns)

 

The second has a variable number of entries separated by " , "

 

Using Split column in Power query, I have isolated most of these entries by splitting into 2 columns at the leftmost Delimiter which for all these entries seems to give me what I want. Unfortunately all the Text only entries have been kept in the first of the split columns (see attached image).

 

Is there any way to exclude those "text only" entries from the split so I can end up with all those payees in a single column, ie no null entries in that split second column.

 

Thanks

 

Colin

 

 

 

PowerQ.jpgHi,

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @colmac ,

 

For the sake of simplicity you could just add a third column:

if [Column2] = null then [Column1] else [Column2]

 

If you want to do it inline, you could right-click a null cell in [Column2], go to Replace Values, replace with "aaa", then amend the auto-generated code in the formula bar to change "aaa" to [Column1].

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
colmac
Regular Visitor

Thanks for such a quick and helpful reply.

Worked perfectly - mind you I suspect you knew it would!

 

Many thanks though 

BA_Pete
Super User
Super User

Hi @colmac ,

 

For the sake of simplicity you could just add a third column:

if [Column2] = null then [Column1] else [Column2]

 

If you want to do it inline, you could right-click a null cell in [Column2], go to Replace Values, replace with "aaa", then amend the auto-generated code in the formula bar to change "aaa" to [Column1].

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors