Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannaiogr
Creator II
Creator II

barchart- date axis, show bars when counts are 0 (pic included)

Hi all, 

this is a master calendar date field. I picked dates from 1/8/2021 to 1/9/2021

and the barchart showed only the dates when information was present. I did" label values" to show the counts.

Is there a way to show the bars with label 0 for the gap dates where there are 0 counts?

Thank you in advance!

15 Replies
ioannaiogr
Creator II
Creator II
Author

Yes, the barchart is already attached in my opening thread,

dimension is "date" , which is a master calendar field and measure is count(distinct id1).

@Digvijay_Singh 

Digvijay_Singh

Did you try this?

count(distinct id1) + Sum({1}0)

You said selections in the date filter offer nothing? not sure what does that mean?

ioannaiogr
Creator II
Creator II
Author

@Digvijay_Singh Yes i tried it! But I mean , If i for example select in date rangepicker 1/8/2021 to 1/9/2021 then it shows all the dates, doesn't just restrict them to my selected ones. Sorry for my english !

Look , attached is a pic of what i mean

 

 

(also, do you think that it's my master calendar script? it's attached in previous posts)

 

 

Digvijay_Singh

Not that easy to find the problem without seeing the app, @AshutoshBhumkar  has shared master calendar script working form him.

What if you remove {1} in below - 

count(distinct id1) + Sum(0)

not that easy to track the actual problem without playing with the app, @AshutoshBhumkar  had already checked and as I see he found thing working fine with his sample app so not sure..

ioannaiogr
Creator II
Creator II
Author

Hi @AshutoshBhumkar , tried your script, gives faulty results to me, please look below

ioannaiogr
Creator II
Creator II
Author

I don't know if it's helpful, but the initial barchart with the said dimension and measure shows indeed all master cal dates.

But when I select from the filter for "field" it then shows only the dates that this field has info for. I wanted to keep the mastercalendar-ness ( 😛 ) for when i do other selections too. @Digvijay_Singh  @AshutoshBhumkar 

What it does is that normal?