Split String with Delimiter

Hi, Do we have option to split string with delimeter as seperate fields. in eazyBI report ?

For eg- “abc>def>ghi” , say we want to get values only after 3rd delimiter “>” of whole string vlaue. which is ghi.

Thanks,
Sonam

Hi @Sonam,

You might create a new calculated measure and use the regular expression ExtractString() to get a specific part of the string.

ExtractString(
  --use here the property holding the value you would like to modify
  “abc>def>ghi”,
  --regex to find first two > and then return everything (.*) after the second >
  '.*?>.*?>(.*)', 
  --take the first group matching the pattern
  1)

The results might look like this:
image

Best,
Zane / support@eazyBI.com

Thanks for reply Zane.
This is what i used -

( ExtractString(
“ [Measures].[Issue AP Region] ”, ‘.?>.?>(.*)’,1). )

where one value of AP region is “Productions LLC > US > NA”

After updating above formula, i got below error-
" Formula is not valid:
Lexical error at line 2, column 3. Encountered: “\u201c” (8220), after : “” "

Hi!

Do not put [Measures].[Issue AP Region] between quotation marks!
Also there is a period (.) before the last closing parenthesis, not sure why is it there.

Kind regards,
V.

1 Like

Hi @zane.baranovska
I have the measure = cod. product (Ex: eat 29) and I want to get only the first sentence (eat), Is it possible ?