Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Substr


Hi,

Can someone please help me with this requirement.

I have column "Invoice Tax Description" which has values like [10PT, 11TR, 12FR, 13YT, 14GH]

I want the values as 2010 or 2011 or 2012 or 2013 or 2014.

Basically I want to concatenate '20' & [first two characters of Invoice Tax Description]

I wrote my expression as ='20'&substr([Invoice Tax Description],1,2)

Thank you in advance.

Regards,

Adi

1 Solution

Accepted Solutions
sunny_talwar

Try this may be:

=20 & Left([Invoice Tax Description], 2)

or if you want it to be actual date year use this:

=Date#(20 & Left([Invoice Tax Description], 2), 'YYYY')

Best,

Sunny

View solution in original post

3 Replies
sunny_talwar

Try this may be:

=20 & Left([Invoice Tax Description], 2)

or if you want it to be actual date year use this:

=Date#(20 & Left([Invoice Tax Description], 2), 'YYYY')

Best,

Sunny

Not applicable
Author

Thank you Sunny. It worked.

sunny_talwar

Awesome!