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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
dustonmoore
Contributor II
Contributor II

How-To Remove Data after _ on load

We use our customer numbers in many tables but they are not always kept in the same format. For orders the customer numbers will be 12345_0, 12345_1, 12345_2. The number after the _ represents a different ship to. For credit/debit memos the customer numbers will not have any thing after the primary number for example: 12345 instead of 12345_0. We are using the order customer numbers as a key. Is there a way for me to connect these either on or after load?

3 Replies
Øystein_Kolsrud
Employee
Employee

You might want to look into this function: https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFun...

Using that you should be able to write an expression like this:

SubField(Order, '_', 1)

dustonmoore
Contributor II
Contributor II
Author

I see how that would work but could I do this on load so that I could connect the two set of data using the Customer Number key?

Øystein_Kolsrud
Employee
Employee

I'm not sure I understand, but do you mean you would like to create a table like this?

OrderKeyNumber
12345_0123450
12345_1123451
1234512345-
23456_0234560
23456_1234561

If so, then you should be able to do something like this:

MyTable:

Load

  Order,

  SubField(Order,'_',1) as Key,

  SubField(Order,'_',2) as Number

Resident SourceTable;