Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
stats101
Partner - Contributor III
Partner - Contributor III

Show empty values as zero in line chart with set analysis

Hi,

I have records with empty date entries like the following:

DateCountActivity

07/01/2016

5View
08/01/201610View
08/01/20165Create
10/01/20165View
12/01/20162Create
13/01/20166View

I am using the following expression sum({<Activity={'View'}>}Count) to try and produce a line chart for view activity only, however it skips the intervening dates where rows with the value do not exist. It works interestingly when I remove the set analysis. I am using a master calendar.

Any help appreciated.

Thanks,

Message was edited by: Shuhel Miah with new detail

1 Solution

Accepted Solutions
sunny_talwar

Try this expression:

Sum({<Activity={'View'}>}Count) + Sum({1}0)

and uncheck 'Suppress Zero Values' on the presentation tab.

Capture.PNG

View solution in original post

4 Replies
Not applicable

stats101
Partner - Contributor III
Partner - Contributor III
Author

Hi Lauren,

Thank you for the response. I did a bit more investigation work, and have realised that the set analysis query is causing the behavior. Have updated my original question.

Regards,

Shuhel

sunny_talwar

Try this expression:

Sum({<Activity={'View'}>}Count) + Sum({1}0)

and uncheck 'Suppress Zero Values' on the presentation tab.

Capture.PNG

stats101
Partner - Contributor III
Partner - Contributor III
Author

I had to remove the 1 as it was ignoring selections i.e. Sum({<Activity={'View'}>}Count) + Sum(0) but it works. Excellent!