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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unexpected output while loading

Hi,

For the below statement,

A:

LOAD * INLINE [
F1
00222
0222
011
]
;

Ideally, the output should be :

00222

0222

011

However, we are getting the output as (refer to the attached image):

00222

00222

011.

Please help.

Thanks,

Vijit

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

     Try this.

A:

LOAD Text(F1) INLINE [

F1

00222

0222

011

];

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

     Try this.

A:

LOAD Text(F1) INLINE [

F1

00222

0222

011

];

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

delete F1 and try it

Anonymous
Not applicable
Author

Thanks Guys. It's working fine.

Anonymous
Not applicable
Author

There's another query reference to my previous question.

I have a QVD Where I need to load as below:

MVKE:
LOAD
Text(MATNR) as Material,
Text(MATNR) & VKORG AS MRP_Key
FROM
$(v_MasterQVDPath)\MVKE.QVD(qvd)
where
match(VKORG,'A001','F001') and
match(VTWEG,'99') and
Len(Trim(KONDM))>0
and
Text(MATNR) = '0023128';


I have 2 Rows where MATNR = 0023128 & MATNR = 023128.

But, when we have a where condition as Text(MATNR) = '0023128' it returns 0 rows & when we have a where condition as Text(MATNR) = '023128' the load statement returns only 2 rows, but returns same values for both.

Colin-Albert
Partner - Champion
Partner - Champion

The original result is due to the way that QlikView tokenises the data as it is loaded. QlikView stores all data as dual data types. For text data the numeric part is blank.

When loading your data, the first value encountered is 00222, so QlikView will store the text value as 00222 and the token for the numeric equivalent 222.

When the second value is loaded 0222, QlikView recognises that the equivalent numeric value 222 already exists, so only stores a pointer to the existing value.

This is why you get the same value returned for rows 1 and row 2. Numeric data will store the first value encountered for that number as the text portion of the dual data.

To prevent this use the text() function which forces QlikView to treat the data in the field as text, so the values 00222 and 0222 are recorded as separate values.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Try after removing the Text() in where condition.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!