Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
mtabernad
Partner - Creator
Partner - Creator

Not showing all days in month, bar chart

Hi all,

I am trying to display all the days of the month even if they have '0' value but they do not show up.

captura1.png

I included the options "include null values" and "include zero values" but it does not work:

captura2.png

capture3.png

 

Can anyone help please?

 

Thank you in advance.

1 Solution

Accepted Solutions
rbartley
Specialist II
Specialist II

I see the problem.  You only have records with a Signature and Type_of_alert value for days 14, 21 and 31 (which is strange given that you are looking at February, but I didn't look any further into this).  

Missing days with zero or null values 1.PNG

But, the definition of Critical alerts includes explicit filters on these fields in the set analysis:

Missing days with zero or null values 2.PNG

So, an easy way of dealing with this would  be to change the formula to wrap it in if(IsNull(<your existing formula>),0,<your existing formula>) as below:

 

if(IsNull(
count({$<Signature={"$(='Alert')"},Type_of_alert={"$(='Configuration Upload')"},YearMonth={"$(=Max(YearMonth))"}>}hour)+
count({$<Signature={"$(='Alert')"},Type_of_alert={"$(='Configuration Download')"},YearMonth={"$(=Max(YearMonth))"}>}hour)+
count({$<Signature={"$(='Alert')"},Type_of_alert={"$(='Online Edit')"},YearMonth={"$(=Max(YearMonth))"}>}hour)+
count({$<Signature={"$(='Alert')"},Type_of_alert={"$(='Mode Change')"},YearMonth={"$(=Max(YearMonth))"}>}hour)),0,
count({<Type_of_alert=,YearMonth={"$(=Max(YearMonth))"}>}hour))

 

 

This results in the following output:

Missing days with zero or null values 3.PNG

You could probably do this using set analysis too, which I'm sure would be more efficient, but the if(IsNull()) solution was quicker to implement.

I've attached a new version of you app in which you'll find this solution on the second tab.

 

 

View solution in original post

9 Replies
rbartley
Specialist II
Specialist II

Hi,

 

It would be easier to troubleshoot this issue if you could include a copy of your app.  In the meantime, do you have entries in your data for these dates and are you using a master calendar (full list of dates in a separate table)?  If the answer is no to both, you will never see the dates because the dates do not exist, so you will need to create a master calendar table.

mtabernad
Partner - Creator
Partner - Creator
Author

Thank you rbartley for your reply. I include a copy of the app. Yes, I am using a master calendar in which should be a full list of dates.

Hope you can help me futher.

rbartley
Specialist II
Specialist II

Hi MtabernCapture.PNGad,

Unfortunately, you have exported the app with no data, so none of the fields are accessible.  You will need to export it again with data (alter it first if it is confidential) for anyone to be able to help.

 

mtabernad
Partner - Creator
Partner - Creator
Author

The file is too heavy to attach it with data. How can we do it?

rbartley
Specialist II
Specialist II

Why not just apply a date restriction when loading the data?  If this is still too large, add some more restrictions to the load script until it is small enough. You could also remove all of the other sheets so only the one with the chart you want to correct is left. We only need a subset of the data to analyse and correct the issue.

mtabernad
Partner - Creator
Partner - Creator
Author

Thank you again for your time and your help. I did what you said. File is attached.

rbartley
Specialist II
Specialist II

I see the problem.  You only have records with a Signature and Type_of_alert value for days 14, 21 and 31 (which is strange given that you are looking at February, but I didn't look any further into this).  

Missing days with zero or null values 1.PNG

But, the definition of Critical alerts includes explicit filters on these fields in the set analysis:

Missing days with zero or null values 2.PNG

So, an easy way of dealing with this would  be to change the formula to wrap it in if(IsNull(<your existing formula>),0,<your existing formula>) as below:

 

if(IsNull(
count({$<Signature={"$(='Alert')"},Type_of_alert={"$(='Configuration Upload')"},YearMonth={"$(=Max(YearMonth))"}>}hour)+
count({$<Signature={"$(='Alert')"},Type_of_alert={"$(='Configuration Download')"},YearMonth={"$(=Max(YearMonth))"}>}hour)+
count({$<Signature={"$(='Alert')"},Type_of_alert={"$(='Online Edit')"},YearMonth={"$(=Max(YearMonth))"}>}hour)+
count({$<Signature={"$(='Alert')"},Type_of_alert={"$(='Mode Change')"},YearMonth={"$(=Max(YearMonth))"}>}hour)),0,
count({<Type_of_alert=,YearMonth={"$(=Max(YearMonth))"}>}hour))

 

 

This results in the following output:

Missing days with zero or null values 3.PNG

You could probably do this using set analysis too, which I'm sure would be more efficient, but the if(IsNull()) solution was quicker to implement.

I've attached a new version of you app in which you'll find this solution on the second tab.

 

 

mtabernad
Partner - Creator
Partner - Creator
Author

uuuuoooo thank you so much! you made my day! I have no words to express my gratitude to what you made for me. Appreciate it!

rbartley
Specialist II
Specialist II

No problem.  I'm glad it helped.

¡Que tengas un buen día!