Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is there any way to distinguish NULL from 0 in a table

Hello,

I have a weird situation. I have a table which has around 60 column including Number and string. Based on some column we are doing some calculation and creating new column (i.e Column 1 + Column 2 = Column 3). This column is having Null and 0 value in Database but I would like to do the same on QlikView Dashboard.

I know I can change Null Symbol under Presentation Tab to show those records which has Null in database but what should I need to do for those column where we are using something like if(isnum([Column1]),1,0)


I'm new to QlikView world so don't know the tricks to do this. I appreciate if someone can guide me on this.


Regards,

Ankit

8 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

You can use the IsNull() function instead. But a sum() of mixed 0 and NULL values will always return 0.

Not applicable
Author

Hello Peter,

Thanks for quick response. I would like to show both Null and 0 under the table.

For example: I have a column 1 where i have 200 records where the possibility is it could be 0, Null or Value (Numbers) I would Like to show all of this as it is. Since I said we are using if(isnum([Column1]),1,0) for calculation its really difficult for me to change this as whole logic will change and I may get wrong data sets.

Regards,

Ankit

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

You can do something like

IF(ISNULL(FieldName),'NullField',LEN(FieldName) =0,'Zero')

thakkarrahul01
Creator
Creator

From your explanation, it sounds like you want to handle NULL values and display 0 instead of NULL.

To do so you can use :  if(isNull (columnName),0,columnName)

                                   OR

                                      alt(columnName,0)      //alt functions returns first Non NULL value from list

Not sure whether I have understood your problem perfectly !! Though, hope this helps you

Chanty4u
MVP
MVP

hi,

https://community.qlik.com/docs/DOC-3155

hope this helps u abt nulls

Not applicable
Author

If the field have number only then use Alt function to convert Null values into zero value.

Alt(field1,0) + Alt(Field,0)

Not applicable
Author

I believe it works for column as well.

Alt(col1,0) + Alt(col2,0)


or you can use Rangesum function like: Rangesum(col1,col2) or Rangesum(field1,field2)

Not applicable
Author

Thanks you so much Guys but I guess no one understood the problem.

I have a column

For Example "Finance Table"

12
Null90
0100
0Null
600Null
5000
300
4400500
Null10
080
050

Something like that. Now I would like to display same on dashboard. But here is the two challenges I'm facing

1. This table is used so many places on dashboard, So I would like to show only particular column only on a particular area of dashboard which should show the records as it is.

2. Some places I'm also creating Calculative columns like Column 1 + Column 2 = Column 3 and so on also while doing so I already used if(isnum([Column1]),1,0) Kind of logic. Is any simple way to get this column as it is and it should show Null and 0 along with Numbers. ?

Once again for quick response and look forward for the same on my problem

Regards,

Ankit