Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

Cutting a String

Hi All,

I'm trying to get the last bit of a string out, but I'm not doing it right!

This is my string and couple of examples:

100-ARINVK-13296910

029-ARINV-10816695

I need to get the numbers after the second '-'. So in the example above, this would be:

13296910

10816695

I've tried this:

    Mid(Index("invoice_number_numeric",'-',2),8)as InvoiceNo2

But it's not pulling it through.

What am I doing wrong?

I'm a newbie to this, so any help is appreciated!

Di

5 Replies

try

Right(invoice_number_numeric, 😎

Specialist II
Specialist II

Try like this..

SubField(invoice_number_numeric,'-',3)

Master III
Master III

SubField(invoice_number_numeric,'-',-1) //-1 retrieves last field

Specialist
Specialist


Hi,

Pradeeps solution seems to me the best one. add 'as InvoiceNo2' to it, and it should work in all instances.

Master III
Master III

Mid(invoice_number_numeric,Index(invoice_number_numeric,'-',2)+1,8) as InvoiceNo2