
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to convert null values to 0
Hi all,
I have a set of data with posting codes and the amount posted against them each period- I want to put these into a pivot table, however there are some periods where certain codes have nothing posted against them. When I export the data from the table, these are assigned a value of '-', rather than 0, which messes up the template which I have to populate with this data. After researching and trying to work out how to convert these to 0, I found something about an option to set chart properties to 'populate missing cells' within Qlik View, which sounds like it would be ideal, but there doesn't appear to be an equivalent in Qlik Sense.
I have also tried several methods of manipulating the data to convert these to 0, but the issue is that these are not true null values, but rather missing values (type two, I believe!) so there is no data to convert. Does anyone have any suggestions on how to do this?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Syntax: Alt(expression, 0)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could try to convert your null values with this
NullAsValue A,B;
Set NullValue = 'NULL';
LOAD A,B from x.csv;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try use
if ( isNull(Column),0,Column)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This can be done using the LogiExport extension:
https://logiexport.logsys.co.il/articles/how-to-easily-control-the-values-formatting/
https://logiexport.logsys.co.il/documentation/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Channa mentioned, you probably want something like:
if(isNull(ABC),0, ABC)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this too
Coalesce(FieldName, 0) as FieldName
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
