Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Specialist
Specialist

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

Capture.PNG

Highlighted
Not applicable

Hi,

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

Understanding the Master Calendar (video)

Best Regards,

Philipp

Highlighted
Partner
Partner

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

Capture.PNG

Highlighted
Not applicable

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?

Highlighted
Contributor
Contributor

Try using this in your measure.

 

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

 

This will make your timeline constant