Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

display zero or null in a chart

I'm looking to create a bar chart similar to a mini chart in that I'm limited in space for adding descriptions or values. The chart shows volume by day of the week. When choosing a sub-set of days (for example only weekends) the chart shows the two bars for Saturday and Sunday. I would like the chart to keep a placeholder for Monday through Friday and show the Saturday & Sunday values. Is this possible?

4 Replies

Re: display zero or null in a chart

Can you post the sample?

deec
New Contributor III

Re: display zero or null in a chart

I would add weekday() to your load script so each date has a weekday. You might already be doing this.

Load

    Date,

    Weekday(Date) as Weekday,

    Volume,

    ...

Once you have a "day" associated with each Volume you want,

Create a chart where the dimension is calculated:

=ValueList('Mon','Tue','Wed','Thu','Fri','Sat','Sun')

And the measure compares your Weekday to these values

=sum(if(ValueList('Mon','Tue','Wed','Thu','Fri','Sat','Sun') = Weekday, Volume,0))

By separating the dimension (which essentially creates each "bar") and the expression (which gives the bar it's height), the chart will always show the dimensions because your selections won't affect them.

Frank_Hartmann
Honored Contributor

Re: display zero or null in a chart

have a look at the attached sample.

hope this helps

Not applicable

Re: display zero or null in a chart

I had an identical problem, this website gave me a good solution: Show Me the Zeros

The idea is to create an "=Only({$<Other Dimensions>}Dimension)" expression in your chart that doesn't have anything checked under the "Display Options". This will put values on the expression which forces Qlikview to show the dimensions.

Community Browser