I have Issue Keys with varying lengths of prefixes such as ABCD-123, or ABCDEF-123. How can I use the ExtractString command to pull the prefix to the left of the dash ‘-’?
I would like ABCD-123 and ABCDEF-123 to return ABCD and ABCDEF.
Any help using this command would be appreciated
Thanks
Hi @jeffscudder,
Yes, you may extract the project key part from the issue key using the function ExtractString().
In this case, you might want to capture the first (^ in front of the string) literar word (\w) of the string like this:
ExtractString(
[Measures].[<property or measure containing issue key>],
"^\w+"
)
There are more details on regular expressions in calculations and reference to the documentation for Java regular expressions where are more examples: https://docs.eazybi.com/eazybi/analyze-and-visualize/regular-expressions.
Best,
Zane / support@eazyBI.com