Discussion Board for collaboration related to Creating Analytics for QlikView.
Hi, I am trying to select particular substrings from a long string, but can't seem to formulate a way of doing this. This is the string, and colour-coded substrings I'd like to select:
"Received Order Insert message from gbarnfieldfsn. Instrument: 1M KRW Fix Midpoint, Mkt: 7. Order: Bid 10 @ 1.37."
I want to make new fields and input these substrings in them like below:
Instrument, B/O, Amount, Price
1M KRW, Bid, 10, 1.37
I can think of different operators like trim, index, right, left, len, etc. but finding it very difficult to select these without wildmatches. Any help greatly appreciated!
Go to Solution.
subfield(Rest,' ',2) as [B/O],
subfield(Rest,' ',3) as Amount,
subfield(Rest,' ',5) as Price;
textbetween(MyString, 'Instrument: ','Fix') as Instrument,
subfield(MyString,':',-1) as Rest;
left(MyString, len(MyString)-1 ) as MyString
Something like this:
subfield(Rest,' ',1) as [B/O],
subfield(Rest,' ',2) as Amount,
subfield(Rest,' ',3) as Price;
subfield(MyString,':',-1) as Rest
Thanks a lot for this. However I'm getting it slightly misplaced like below:
I'm getting Amount under Price and B/O under Amount: