Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ZoeM
Specialist
Specialist

How to Show zero values on Line Chart

Hi Community.

I have a weird one where I have a combo line/bar chart and table where in the chart itself I would like to show all months for the respective selection even if the value is zero. Please see chart below:

Combo Chart.JPG

 

As you can see in the chart, I am missing February and December because the values are zero. 

In the chart, I have two lines which represent Total (orange) and Filtered result count (green). Though the green line is showing zero for Jan, Mar and Sep values are zero per filtered selection but you can see from the total line that there is associated counts.

Under dimensions, I have unchecked Suppress When Values are Null. When I check Show all Values, it ignores my year filter and I dont want that. 

Under Presentation, I have Unchecked Suppress Zero Values. I also tried to check/uncheck Zero on bars but hat did not change anything.

I only have one dimension which is Year Month. 

Any ideas on how I can get this to work?

Thanks in advance. 

 

Labels (3)
1 Solution

Accepted Solutions
Brett_Bleess
Former Employee
Former Employee

Have a look at the following Design Blog post, it might help, and feel free to backup up to the main Design Blog site and do your own search there as well, lots of things out there that may help on this one...

https://community.qlik.com/t5/Qlik-Design-Blog/NULL-The-Invisible-Nothing/ba-p/1467674

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post

5 Replies
dplr-rn
Partner - Master III
Partner - Master III

Answered a similar question earlier.

if the data is not present Qlik doesnt show it. instead you will need to add dummy values

check below

https://community.qlik.com/t5/QlikView-App-Development/data-not-present-in-database-but-Qlik-table-s...

ZoeM
Specialist
Specialist
Author

Thanks for the prompt response Dilipranjith.

So if that is the case, why does zero show in the table but is unable to show in the chart?

Is that visualization limitation?

My data is dynamic due to source, and when filters are changed then values will change. I don't think that solution will be of benefit based on nature of the application. 

Is that the only available work around?

Thanks...

Brett_Bleess
Former Employee
Former Employee

Have a look at the following Design Blog post, it might help, and feel free to backup up to the main Design Blog site and do your own search there as well, lots of things out there that may help on this one...

https://community.qlik.com/t5/Qlik-Design-Blog/NULL-The-Invisible-Nothing/ba-p/1467674

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
ZoeM
Specialist
Specialist
Author

Great article. 

Working on how I can present the Nulls in my chart, doe snot get me to the desired result immediately but at least guides me in the right direction.

Thanks for looking into this!

Mr_H_Huang
Contributor III
Contributor III

My solution is to add an additional 'Dummy Line' next to the line where we want to show with 0 value.

My case is a line chart, I have the 0 value in measure (which is a set analysis) that comes with valid dimension as YEAR & WEEK. However the QlikView line chart just skips the 0 value and dimension. If for example measure value is 0 in year 2023 week 35, the line chart goes from week 34 to week 36 and skips week 35. If I select week 35, I can see the value is 0, but the dimension is '-' which means null I suppose. 

My solution is to add a very similar but simplified additional expression next to my original measure's expression. The setting/configuration remains the same for the original measure's expression. Then we uncheck all "Display Options" (like bar, line), and we check "Invisible" for the newly added additional expression.

Original expression, If it is for example 
COUNT( {< flag_a ={'1'}, flag_b ={'0'} >} DISTINCT employee_no)

Mr_H_Huang_0-1709564351540.png



Then your additional expression could be like below. If it is the "flag_a ={'1'}" causing the 0 value could not be shown.
COUNT( {< flag_b ={'0'} >} DISTINCT employee_no)

Mr_H_Huang_1-1709564397269.png

 

 

Before applying the solution:

Mr_H_Huang_2-1709554059163.png

 

After applying the solution:

Mr_H_Huang_3-1709554059163.png