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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
AndreasMoller
Contributor III
Contributor III

Why is there still null values?

Hello,

I have a problem with null value.

I'm using a pivot table and the dimension "q_produktklass" having some null values.
To make the null value be sorting last i was using this formula:

=if(isnull(q_produktklass), 'Värde saknas', q_produktklass)

But as you can see at the picture there is still some null values. Can anyone help me understand why? 
If i go to the dimension and uncheck "Include null values" they disappear. But i dont want to do that. 

AndreasMoller_0-1691489119426.png

 

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

This is typically a result of a data schema join with missing values.

Consider:

Load * INLINE [
A, B
1, 2
4, 5
7, 8
];

Load * INLINE [
B, C
2, 100
8, 200
];

Or_0-1691493155912.png

In this scenario, C isn't null, it's outright missing for the combination of A and B {4,5}.

View solution in original post

7 Replies
Lakshmanan
Partner - Contributor III
Partner - Contributor III

Also make sure , There are no Blanks in the field.

Mark_Little
Luminary
Luminary

You are only checking your first field is null, Check for Null values in the second field. 

 

Or
MVP
MVP

This is typically a result of a data schema join with missing values.

Consider:

Load * INLINE [
A, B
1, 2
4, 5
7, 8
];

Load * INLINE [
B, C
2, 100
8, 200
];

Or_0-1691493155912.png

In this scenario, C isn't null, it's outright missing for the combination of A and B {4,5}.

AndreasMoller
Contributor III
Contributor III
Author

Thanks, but it's the same if I remove the other dimensions and only got "q_produktklass" left. 

AndreasMoller
Contributor III
Contributor III
Author

I have tried that already, but i got the same result. 

AndreasMoller
Contributor III
Contributor III
Author

Yes that may be it, can i enter a value in that "missing" value? 

Or
MVP
MVP

The best approach would be to fix the data by filling in the missing values.

I think you can work around this by using Aggr(), something like:

=if(isnull(Aggr(Only(C),C)),'ZZ',C)

But this is pretty ugly and may cause performance issues in some cases.