Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sona_sa
Creator II
Creator II

Need Help in Qlik

Hi,

I have a field EXTRA and Value is like this :

AOB 327, AOB 328, Case Drain 103, Case Drain 107, FLIB 110, FLIB 319

I need only alphabetically character from this field; How I can derive in Qlik.

Like AOB, Case Drain, FLIB.

Thanks

 

Labels (1)
5 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

If all values have the same structure, with the textual part and the numeric part separated by a space, then the easiest solution would be to use the Subfield() function:

 

Subfield(EXTRA, ' ', 1) 

 

Cheers,

Oleg Troyansky

priyanka181088
Partner - Contributor II
Partner - Contributor II

u can  use purgechar() function

purgechar(EXTRA,' 123456789')

 

Thanks,

Priyanka

 

marksouzacosta

Hi @sona_sa,

You can also try the Regular Expression features:

Temp:
LOAD
  EXTRA,
  ReplaceRegEx(EXTRA,'\d+','') AS CleanExtra
INLINE [
EXTRA
AOB 327
AOB 328
Case Drain 103
Case Drain 107
FLIB 110
FLIB 319
12736213 TES123TR 319
];

 

Result:
marksouzacosta_0-1752760467645.png

Source: ReplaceRegEx - Script and chart function | Qlik Cloud Help

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Kaushik2020
Creator III
Creator III

Hi @sona_sa  Please see below option via data load editor. 

Table:
Load * INLINE [
EXTRA
AOB 327
AOB 328
Case Drain 103
Case Drain 107
FLIB 110
FLIB 319 ];

Final:
    LOAD DISTINCT
         Trim(PurgeChar(SubField(EXTRA, ',', IterNo()), '0123456789')) AS ExtraText,
         EXTRA as OldText
RESIDENT Table
WHILE IterNo() <= SubStringCount(EXTRA, ',') + 1;

Drop Table Table;

howdash
Creator
Creator

You can also use the KeepChar() function, like this:

tableName:
Load EXTRA,
Trim(KeepChar(EXTRA, 'aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ ')) as alphaEXTRA
Inline [
EXTRA
AOB 327
AOB 328
Case Drain 103
Case Drain 107
FLIB 110
FLIB 319
];

This ensures that only letters that you specify will be kept.