Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
haymarketpaul
Creator III
Creator III

Splitting UK Postcodes

Hello

Using QV10

I have a spreadsheet with a UK postcodes column in it...

FullPostcodes.jpg

I have another spreadsheet that looks like this...

Postcodes.jpg

I want to be able to match the 2 together based on the first 1 or 2 letters in the postcode so i can then filter my data by Post Town or Region.

How can i obtain the first 1 or 2 letters from my list of full postcodes?

I am thinking i will need to check for an ASCII number to determine if i need just the first letter or the first 2 but i am sure there is a better alternative!?  PurgeChar looks interesting, perhaps i can use subfield to grab the first part of the postcode and purgechar to remove the number part(s) - (thinking as i'm writing here).

Any ideas?  Is there a better solution?

thanks

Paul

1 Solution

Accepted Solutions
haymarketpaul
Creator III
Creator III
Author

Thanks for the reply.  The problem i could see with Left was how to determine whether i needed only the first (Count=1) character or the first 2 (Count=2).

I used this in the end...

PurgeChar(Left(Postcode,2),'1234567890')

View solution in original post

2 Replies
Not applicable

Hi Paul,

Have you tried using the left(fieldname,count) string function and link this to your look-up table?

Cheers,

Shyam

haymarketpaul
Creator III
Creator III
Author

Thanks for the reply.  The problem i could see with Left was how to determine whether i needed only the first (Count=1) character or the first 2 (Count=2).

I used this in the end...

PurgeChar(Left(Postcode,2),'1234567890')