Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
thomastc
Contributor III
Contributor III

Show all dimensions on bar chart even if result is 0

Greetings,

I am sure this must be a simple thing to achieve but it is causing me some grief.

I have a stacked bar chart with 2 dimensions, the first is ‘day of the week’ and the second is a flag that denotes a time period, a simple on off, let’s call that ‘inside business hours’.

I am counting the number of events and plotting them by the day of the week with the stack showing the ‘on off’ element.

I need the chart to always show the full week even when there is not any data. I.e the x axis must always show: sun, mon, tues, wed, thu, fri, sat.

I have turned off the ‘supress zero values’ in the presentation tab but this seems to have no effect whether it is on or off. There must be a simple way around this?

All help is appreciated.

Thanks.

1 Solution

Accepted Solutions
thomastc
Contributor III
Contributor III
Author

I have sorted it now, bit of a bodge to be honest.

If there is a neater way I would like to hear.

As we are talking days of the week (small number and not likely to change any time soon) I made an inline table with the days and used that as the dimension. In the expression I did the following:

=sum(if(DayName = countDayInline, aggr(sum(ActivityCount), DayName, OpeningHours), 0))

Seems to do the job.

View solution in original post

5 Replies
Not applicable

check

properties - > dimension -> suppress null value

uncheck

properties - > dimension -> show all values

thomastc
Contributor III
Contributor III
Author

No difference I am afraid.

Not applicable

can you post your qvw file with this chart?

thomastc
Contributor III
Contributor III
Author

As my report is very large and contains confidential data I cannot post it.

thomastc
Contributor III
Contributor III
Author

I have sorted it now, bit of a bodge to be honest.

If there is a neater way I would like to hear.

As we are talking days of the week (small number and not likely to change any time soon) I made an inline table with the days and used that as the dimension. In the expression I did the following:

=sum(if(DayName = countDayInline, aggr(sum(ActivityCount), DayName, OpeningHours), 0))

Seems to do the job.