March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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.
Solved! Go to Solution.
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"
)
Upvote and accept as a solution if it helps!
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"
)
Upvote and accept as a solution if it helps!
You're a star! Thanks.
Hi, sorry for the very late response. I'm going to check now and get back to you.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
29 | |
21 | |
15 | |
13 | |
10 |
User | Count |
---|---|
62 | |
28 | |
25 | |
22 | |
17 |