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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
draghici1109
Creator
Creator

Using max function deliver null values

Greeting community!

I use the min() function and it delivers me NULLS instead of numeric values. I do not have a clue, why this behavior.

Here are the details:

I want to read the followinf qvd file called HRP1001FZ2.qvd.

Hier is a sample of its content:

%key2;PERNR;PROZT;%key
00000188-0;00000188;0;00000008
00032020-100;00032020;100;30008268
00032032-100;00032032;100;30007087
00032044-100;00032044;100;30001537
00032056-100;00032056;100;30001808
00032068-100;00032068;100;30002200
00032111-100;00032111;100;30004052
00032123-100;00032123;100;30006532
00032159-100;00032159;100;30002201

10001348-50;10001348;50;30001626
10001348-50;10001348;50;30001623

00339660-50;00339660;50;30003234
00339660-50;00339660;50;30001770

10000998-100;10000998;100;30005927
10000998-100;10000998;100;30005929

In this file, I have some double records having the same PERNR. I want to use the min() function over the last field %key, and I get as results NULLs in this field.

Here the code:

HRP1001FZ3:
LOAD
PERNR,
min(%key)
FROM [..\DATA_20\HRP1001FZ2.qvd] (qvd)
Group by PERNR
;

Store [HRP1001FZ3] into [..\DATA_20\HRP1001FZ3.qvd](qvd);
Drop Table [HRP1001FZ3];

I do not understand why I get NULLs in the last column, see next screenshot:

 

draghici1109_0-1619697847353.png

 

Does anyone has an idea what goes wrong?

Thank you in advance!

Alexandru

 

P.S.: I used also max(num(%key)) but got the same results...

Alexandru Draghici
BICC at Komm.ONE
Labels (2)
1 Solution

Accepted Solutions
draghici1109
Creator
Creator
Author

found myself the solution:

 

using min(num#(%key)) solved the problem!

Alexandru Draghici
BICC at Komm.ONE

View solution in original post

1 Reply
draghici1109
Creator
Creator
Author

found myself the solution:

 

using min(num#(%key)) solved the problem!

Alexandru Draghici
BICC at Komm.ONE