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: 
adecora
Contributor III
Contributor III

Remove nulls from a table

Hi! I need to replace null on a pivot table for zeros. I just been encapsulating the measure like `If(isNull(measure), 0, measure)` and It looks to works fine, but in some cases there is some troubles with some dimensions I share this example where there is still some null values even my measure is 'If(IsNull(Null()), 'null', 'not null`)

adecora_0-1766061866025.png

 

Why this is happening? And how I can fix it?

Labels (2)
3 Replies
Nagaraju_KCS
Specialist III
Specialist III

You can try with this 

Alt(Measure,0)

BrunPierre
Partner - Master II
Partner - Master II

This returns the measure when it has value, and zero if not.

=Alt(Measure, 0)

adecora
Contributor III
Contributor III
Author

The problem is that neither `Alt(measure, 0)` or `If(isNull(measure), 0, measure)` works. It happens on pivot tables when a combination doesn´t exits on the orginal dataset, here a simple example

 

```

fact:
Load 
Dim1,
    Dim2,
    Month,
    Round(50 + (Rand() * 50), 2) as Value;
Load * Inline [
Dim1, Dim2, Month
    X, a, sept. 
    X, b, sept.
    X, c, sept.    
    Y, a, sept. 
    Y, b, sept.
    Y, c, sept.
    Y, a, oct. 
    Y, b, oct.
    Y, c, oct.
];

```

In this case it happens to october data for dimension X.

adecora_0-1766075575697.png

It could be achieve with the new pivot table element but user lost functionality to place dimensions on the tables as they want