Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have the data imported from a source in a table in the below format. The column "Location" contains the data and I want to extract the data into a new column (Text Retrieval) as below. There are 2 delimiters (AZ and F0) that I can use and extract the text, If there is no data in the column, the new column must say NA.
Location | Text retrieval |
SIN01F02C03 | SIN01 |
GR04F01C01 | GER04 |
INDI03F03C03 | IND03 |
PAREU02AZBC02 | PAR02 |
null | NA |
CAL20AZAC01 | CAL20 |
null | NA |
CAN01F01C01 | CAN01 |
I added a new colum in the table using Add Column > Extract > Text before delimiter. Using the length of text isnt feasible as the length isn't fixed. Text before delimiter worked but only those rows that have F0 in the Location column yielded the results. Data from the other 2 paramteres weren't considered.
#"Inserted Text Before Delimiter" = Table.AddColumn(#"Filtered Rows2", "Text Before Delimiter", each Text.BeforeDelimiter([Assembly], "F0"), type text)
in
#"Inserted Text Before Delimiter"
I tried using the below but it didnot work:
Table.TransformColumns(Source, {{"Column1", each Text.Start(_, Text.PositionOfAny(_,{"F0","AZ"})), type text}})
Please help,
Thnks,
RVN
Solved! Go to Solution.
You can use this formula in a custom column
= if [Location]=null then "NA" else Splitter.SplitTextByAnyDelimiter({"AZ", "F0"})([Location]){0}
You can use this formula in a custom column
= if [Location]=null then "NA" else Splitter.SplitTextByAnyDelimiter({"AZ", "F0"})([Location]){0}
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
8 | |
7 | |
6 | |
6 |