Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have a calculated column as below
CA-ORG-SDV-FRESZ
CA-OPN-SDR
CA-SRT-RZS-gSRE
OFFICE
OTHER
I would like to export the text before the second delimeter with DAX , the result would be like this :
CA-ORG
CA-OPN
CA-SRT
OFFICE
OTHER
Many thanks in advance.
Tg
Solved! Go to Solution.
Hi, this works but I have 1 case that didn't work
CA-OPF_DFEYH
Result is always the same .
Could you please advise ?
Tg
here is the dax query for
@vnqt use this measure and replace with your actual table name and column name
ExtractedText =
VAR FirstDelimiterPos = FIND("-", 'YourTable'[YourColumn], 1, LEN('YourTable'[YourColumn]))
VAR SecondDelimiterPos = FIND("-", 'YourTable'[YourColumn], FirstDelimiterPos + 1, LEN('YourTable'[YourColumn]))
VAR Length = SecondDelimiterPos - FirstDelimiterPos - 1
RETURN
IF(
SecondDelimiterPos > 0,
LEFT('YourTable'[YourColumn], SecondDelimiterPos - 1),
'YourTable'[YourColumn]
)
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
TextBeforeSecondDelimiter = //Try this
VAR FirstDelimiterPosition = FIND("-", [Column], 1, LEN([Column]))
VAR SecondDelimiterPosition = FIND("-", [Column], FirstDelimiterPosition + 1, LEN([Column]))
RETURN LEFT([Column], SecondDelimiterPosition - 1)
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
@mh2587 Thanks for your help, I got the message "An argument of the 'LEFT' function has the wrong data type or an invalid value."
User | Count |
---|---|
79 | |
74 | |
62 | |
61 | |
45 |
User | Count |
---|---|
108 | |
98 | |
89 | |
82 | |
61 |