Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Linkage - Text/Number Formating

Hi,

I'd like to link two tables together by Part Number. The Part Number can both in a number(1234) or text(002H32) format. How should I specify only a Text match, which means for example I don't want to loose "0"s in front of my text? Thanks!


1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try use text([Part Number])

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Try use text([Part Number])

a_mullick
Creator III
Creator III

QlikView shouldn't drop any leading zeros: it loads what it is given. As long as you ensure that any leading zeros are preserved in the source data, it should be ok. If you load this simple example, you'll see that the 'key' links the 2 tables even though it has different formats.

load * inline [

key, data

001x, 12

abcd, 14

1122, 10

];

load * inline [

key

001x

abcd,

1122

];

Azam

Anonymous
Not applicable
Author

Azam,

Your example works because it is incomplete.  Try this, see that 12 and 0012 are the same for QV (001x is text because of "x"):

t1:
load * inline [
key, data
001x, 12
0012, 40
abcd, 14
1122, 10
];


t2:
load * inline [
key, test
001x, a
0012, b
12, c
abcd, d
1122, e
];

This works correctly:

t1:
load text(key), data inline [
key, data
001x, 12
0012, 40
abcd, 14
1122, 10
];


t2:
load text(key), test inline [
key, test
001x, a
0012, b
12, c
abcd, d
1122, e
];

Regards,

Michael

a_mullick
Creator III
Creator III

Ah...thanks for pointing that out.

Azam

Not applicable
Author

Hi Michael,

thank you for your input! I would modify your answer a little bit to text([Part Number]) as [Part Number].