Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
i need one help i have one field like
field with unit | |
---|---|
| |
| |
| |
| |
| |
|
but here i want to split field with unit into[ field value] and [field unit].
Thanks in Advance.
hi,
It is better if you describe your issue in detail with sample desired output.
Hi Sushil,
i want to split single field into two fields like
[field with unit] into 1) [field value] like-- others 11 33.512
2)[field unit]] like mbps kbps gb
am expecting output like that.
Hi,
You can simply use KeepChar() and purgechar function..
purgechar('absad123',123) returns absad
keepchar('asdf123',123) returns 123
HTH
sushil
Hi,
Try with this code:
LOAD fieldwithunit,
KeepChar(fieldwithunit, '1234567890.') as fieldvalue,
Trim(PurgeChar(fieldwithunit, '1234567890.')) as fieldunit
FROM yoursource;
Marc.
Use subfield() function
As
SubField(FieldName, ' ') will give you only number entries.
Hi,
Try these two in your load script
SubField(YourField,' ',1) as [Field Value],
SubField(YourField,' ',2) as [Field Unit]
Regards,
Ravikumar
If the delimiter is always a space (" ") then you can use the Subfield() function, if not then please provide full data to get more precise answer.
Thanks,
DV
www.QlikShare.com
HI
Try like this
Load *, SubField(FieldWithUnit,' ', 2) as Value,SubField(FieldWithUnit,' ', 1) as Unit Inline
[
FieldWithUnit
OTHERS
33.512
11 Mbps
2 kbps
40.20 gbps
12 gb
];
Hope it helps