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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Clear null fields of a table

Hey guys, I got stuck in this apparently simple thing, but I still can't solve it.

I put a simple example to make you understand :

If I have a table like this :

error loading image

How can I get this result (cleaning all the null values, and storing the results in one row):

Field1, Field2, Field3, Field4

1 , 2 , 3 , 4

Hope someone can help me telling me how can I do that.

Many thanks in advance!! Cheers!

1 Solution

Accepted Solutions
hector
Specialist
Specialist

Load

field_to_group,
max(Field1) as
Field1,
max(Field2) as
Field2,
max(Field3) as Field3,
max(Field4) as
Field4
from/resident table
group by
field_to_group
;

But, if you have other field to group, use the yellow code too

Rgds

View solution in original post

3 Replies
Anonymous
Not applicable

.

hector
Specialist
Specialist

Load

field_to_group,
max(Field1) as
Field1,
max(Field2) as
Field2,
max(Field3) as Field3,
max(Field4) as
Field4
from/resident table
group by
field_to_group
;

But, if you have other field to group, use the yellow code too

Rgds

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks Hector, this is the kind of easy things you got stuck once in a while.

In addition, if you have the same with characters, you can use maxstring() as well.

See you around