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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trim on Load

I would like to TRIM the values of a field to deliver a specific value(AP-EU-AM), but there is no common starting place to do a MID - LEFT or Right.

Here is the data:

WW_FIN_DLD1_CONS_BW_GL_TXN_DATA_AP_

WW_FIN_DLD1_CONS_BW_GL_TXN_DATA_EU_

WW_FIN_CAL1_CONS_BW_VC_TO_DM_OPENPER_AM_

What would be the way to do this on the Load?

Thanks!

Dan

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Maybe

LOAD

     Subfield( YourField, '_', -2) as YourFieldTrimmed,

     ...

View solution in original post

9 Replies
swuehl
Champion III
Champion III

Maybe

LOAD

     Subfield( YourField, '_', -2) as YourFieldTrimmed,

     ...

sunny_talwar
MVP
MVP

What is the expected output here?

Anonymous
Not applicable
Author

Sunny ,

The desired output is AP, EU, AM

sunny_talwar
MVP
MVP

Then swuehl‌ should be able to get you to that output

Anonymous
Not applicable
Author

Swuehl,

Field contains no data-

Subfield(Jobstream,'-',-2)as Region,

swuehl
Champion III
Champion III

Looks like you used a minus sign '-' as delimiter, not an underscore '_'?

sunny_talwar
MVP
MVP

Not the dash ( - ), you need to use underscore ( _ )

Subfield(Jobstream,'_',-2)as Region,

Anonymous
Not applicable
Author

swuehl,

My bad on the '-', fixed it '_' and it worked just fine!

Thanks for the quick response!!

Regrds,

Dan

sunny_talwar
MVP
MVP

If you got what you needed, please mark Stefan's answer as correct to close the thread.