Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie777
Partner - Creator III
Partner - Creator III

Showing null value in bar chart (do not suppressing empty rows)

Hello,

I'd like to show all the month-year bar chart even when they have null (zero) values to be able to see the costs incurred by year month even when a particular year-month has zero value.  It is important to show the information without skipping for zero value year month.  However, the default Qlik Sense visualization suppresses zero (null) bars.  I tried to search in the community, but I couldn't solve this issue.  I'd greatly appreciate it if you could help me with this.  

Newbie777_0-1677396985906.png

Thank you for your help.

 

Labels (1)
8 Replies
BrunPierre
Partner - Master
Partner - Master

Hi @Newbie777 

In QS, you can do this by either unchecking 'include zero values' under the dimension or under Add-Ons-> Data handling.

Newbie777
Partner - Creator III
Partner - Creator III
Author

Thanks, but I already did exactly that and the bar chart is still showing suppressing zero value bars.  I am not sure why.  When I initially created the bar chart, it was showing empty month as well and it is more meaningful to see in that way but it disappeared and got suppressed without me doing anything and after that, I can't get back to the previous way of presentation.  

BrunPierre
Partner - Master
Partner - Master

Try adding "+Sum({1} 0)" to the expression, month year without amount should display 0

Newbie777
Partner - Creator III
Partner - Creator III
Author

Thanks FrunPierre, 

I've added  "+Sum({1} 0)" to the measure expression, but it is still not working.  I tried both ticking and unticking in the Year Month dimension and Add-on, but it is not showing January 2023 value.  

You've mentioned I am supposed to untick the 'include zero values', but it didn't work, so I tried the opposite too, but it didn't work either.  I'd greatly appreciate it if you could shed light to this issue.  

barnabyd
Partner - Creator III
Partner - Creator III

G'day @Newbie777,

You need to create a Master Calendar table to fix this. Qlik is only displaying columns in your chart if there is at least one row of data in the table. If you create a linked table that contains every possible date in the range of interest, and use the date from this table as your horizontal axis, then your chart will show a bar for every date.

There are many tutorials on the forum or YouTube - here is one the first one I just looked up.

I hope this helps.

Cheers, Barnaby

Barnaby Dunn
BI Consultant
Newbie777
Partner - Creator III
Partner - Creator III
Author

Hi Barnaby,

Thanks for responding to my question.  I have in fact been using the calendar table imported from Excel with all the dates in a year with Year Month field, too, so I am not sure why this is not working.  Strange thing is that when I initially created the visualization, it was showing the bar (space with no value) for January 2023, and from that, I was able to gain visualization where costs were missing, and it was useful to see the information in that way, but when I opened the app again, the blank value Year Month got suppressed, disguising the information. If you are not paying careful attention, you will not see that the costs are missing in some months because there's no blank space anymore.  I tried everything which I could find from doing quick search on the internet.  I'd greatly appreciate it if anyone could shed light as to why it was showing zero value bars to begin with and then suddenly start suppressing without me doing anything in particular to change the setting.  

Thank you & best regards,

BrunPierre
Partner - Master
Partner - Master

If you don't mind, could you share some sample data and your chart expression?

Newbie777
Partner - Creator III
Partner - Creator III
Author

Thanks BrunPierre, but subsequently my company's Qlik Sense Helpdesk people informed me that it was due to the following problem, and after I fixed that and ticked both include zero tickbox in Data section and Add-ons section, the problem was solved!

Newbie777_0-1677496867125.png