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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Shak1254
Helper I
Helper I

Help splitting this column

Sample.jpg

 

I need to split this by dd/mm/yyyy (UK date format).

I'm in need of an DAX formula that'll extract the date portion (02022024) of the Source Name column and then return the result in the above manner. 

If someone can guide me in this, it'll be wonderful. I'm very raw with DAX. 

1 ACCEPTED SOLUTION
govindarajan_d
Solution Supplier
Solution Supplier

Hi @Shak1254,

 

Can you please try this:

 

 

Date =
VAR DatePosition =
    LEN ( Files[FileName] ) - LEN ( "ddmmyyyy" )
        - LEN ( ".xlsx" ) + 1
VAR DateString =
    MID ( Files[FileName], DatePosition, 8 )
RETURN
    FORMAT (
        DATE ( RIGHT ( DateString, 4 ), MID ( DateString, 3, 2 ), LEFT ( DateString, 2 ) ),
        "dd/mm/yyyy"
    )

 

 

 

govindarajan_d_0-1707393035791.png

 

Upvote and accept as a solution if it helps!

 

View solution in original post

4 REPLIES 4
govindarajan_d
Solution Supplier
Solution Supplier

Hi @Shak1254,

 

Can you please try this:

 

 

Date =
VAR DatePosition =
    LEN ( Files[FileName] ) - LEN ( "ddmmyyyy" )
        - LEN ( ".xlsx" ) + 1
VAR DateString =
    MID ( Files[FileName], DatePosition, 8 )
RETURN
    FORMAT (
        DATE ( RIGHT ( DateString, 4 ), MID ( DateString, 3, 2 ), LEFT ( DateString, 2 ) ),
        "dd/mm/yyyy"
    )

 

 

 

govindarajan_d_0-1707393035791.png

 

Upvote and accept as a solution if it helps!

 

Hi @Shak1254 ,

 

Did the solution work?

You're a star! Thanks. 

Hi, sorry for the very late response. I'm going to check now and get back to you. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.