Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Sense - Bar charts with constant time line - even with no data

Hello,

I've looked for the answer across the web and across the two thread below but still an unanswered.

bar charts time lines on Qlik Sense.

I have 2 tables:

Sales:

Product

ShipToCustomer

Qnty

DateShipped

MasterCalendar:

DateShipped

Year

Month

Week

I created two bar charts to show how many shipment were made per product per Month/week.

I'm using Year-Month and Year-Week measures (for example 2017-03 is March and 2017-15 is the 15th week of 2017)

problem is that if there are no sales to a product in a month or a week it doesn't show at all, and I would like it to show with Qnty zero (although none exists in the data set)

I tried to add Sum(1) Sales * 0 but then all the month are shown and there is not filtering on the products at all.

put simply, I want the timeline to remain constant and to allow filters by products and customer to take affect on the graph.

can someone please enlighten me how can this be accomplished?

How to retain hierarchy view of null values?

Force showing all values on x-axis

5 Replies
Anonymous
Not applicable
Author

Hav you tried this?? Create master calender with Master Calendar Generation Script then

Capture.PNG

Not applicable
Author

Hi,

there is a good example from Michael Tarollo incl. Sales Analysis.qvf and MasterCalendar.

Understanding the Master Calendar (video)

Best Regards,

Philipp

OmarBenSalem

Do as Shiva said, and then (if you want), play with this: (under presentation):

Capture.PNG

Not applicable
Author

Hello,

I've tried all of the above before posting my question, or maybe I'm missing something basic.

1. I marked show zero values

2. I have a master calendar table which includes all dates

3. I tried with both line and bar charts

I filter the graph to show shipments for a specific product and only relevant months are left so I can't see the months without shipments.

any ideas?

chaudharic3333
Contributor
Contributor

Try using this in your measure.

 

if(count({1} [your timeline dimension]) > 0, ([your measure]),0)

 

This will make your timeline constant