Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with Button Select In Field when data is null

I've set up a button with a series of Select In Fields to look at all the different date fields in my data model.

I'm having the following problem. The first set of field that the button selects from are the day, month and year in the project management system that we use. If I select 5th September then the data comes back OK because I have an entry in there for that day. But if I select 6th September (I haven't made an entry for yesterday yet) then the day value comes back NULL (or '-', I know this because I've created a text object to display the value).

What this seems to mean is that when I get a NULL value QlikView just aggregates all the project management data so instead of seeing 0h 0m in the box I have set up I get 121h 48m which is everyone's total.

Can anyone explain how I can get QlikView to return 0 instead of NULL if a field has no data for a selected person?

6 Replies
kouroshkarimi
Creator III
Creator III

Maybe it would be better to wrap a condition around your time box to handle Null values?

Qlikview is returning a Null because there is nothing to return, so you would have to create the zero values on the table. If you autogenerated dates with zero values on your table it might help, but it's difficult without seeing your datamodel.

Not applicable
Author

Hi ,

Can you provide your sample app to have better understanding on your data structure.

Regards,

Venkat

Not applicable
Author

Thanks for the responses. I can't really upload my report because there's some personal information in there. I guess what I maybe need to do is add some zero values to the data source where data is missing; I will maybe have to modify my data extraction job to automatically add a zero row for anyone who doesn't have any data.

kouroshkarimi
Creator III
Creator III

I had a similar issue with missing values in a crosstable, so I created a cartesian product using the dimensions and appended the missing values to the table which fixed the issue. Maybe you could do something similar?

Not applicable
Author

The SQL table only contained rows for people who had actually booked time on that day, so I wrote an extra insert statement to add all the people without time booked and set their time to 0. This solved the problem. Thanks to everyone who suggested stuff.

whiteline
Master II
Master II

You can't make selection of NULL value.

You can try NULLASVALUE in script to be able to select NULL as empty string.

Or you can rewrite your expressions so that the behave correctly when the date is NULL.