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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
cyborgandy
Helper II
Helper II

Split Column DAX Before Space

Hi All,

 

I have below column in my dataset, I want to use delimiter DAX to give me all the left value result before the space however I have written a dax but as I have few entries which doesnt have space in the value its throwing me error " " not found in the column, below is the column format, can someone please help.

 

Full Post Code
RG24 8YB
BT4 1AF
M12 6LB
60323
50170
3369
60327
75011
WC1H 8HA
G71 5PW
D02 HW77
VLT 1455
D02 YA40
1 ACCEPTED SOLUTION
eliasayyy
Memorable Member
Memorable Member

New Column =
IFERROR(
    LEFT(
        [Full Post Code], 
        SEARCH(" ", [Full Post Code], 1, LEN([Full Post Code])) - 1
    ), 
    [Full Post Code]
)

 

annonymous1999_0-1692005145100.png

 

View solution in original post

2 REPLIES 2
mlsx4
Memorable Member
Memorable Member

Hi @cyborgandy 

 

Try this code... Otherwise, you will miss some values when there's no space

 

 

New Column = 

IF(CONTAINSSTRING([Full post code]," "),
    LEFT(
        [Full Post Code], 
        SEARCH(" ", [Full Post Code], 1, LEN([Full Post Code])) - 1
),
[Full post code]
)

 

 

Kind regards

eliasayyy
Memorable Member
Memorable Member

New Column =
IFERROR(
    LEFT(
        [Full Post Code], 
        SEARCH(" ", [Full Post Code], 1, LEN([Full Post Code])) - 1
    ), 
    [Full Post Code]
)

 

annonymous1999_0-1692005145100.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.