Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sturmeyp
Contributor II
Contributor II

Display Month Dimension Chart (even when no data exists)

Hi All

There are various posts relating to my question but thus far haven't been able to find a solution!

I need to create a line/bar chart which has one measure and one dimension (the month)
I always want the chart to show a static 12 months (Jan-Dec) even when there is no actual data for a given month.  

My data is organised as follows

ItemValueMonthYear
Item #1928Jan2019
Item #2562Jan2019
Item #322Feb2019
item #4881Feb2019
Item #5900Feb2019
Item #6101Mar2019
Item #7402Mar2019

 

This is how is shows currently but I want to show full 12 months (even with no data)

QlikChart.PNG

Any help much appreciated

Paul

1 Reply
martinpohl
Partner - Master
Partner - Master

Hi!

You can't show what is not existing.

You have to create dummy values for each month to have an existing value to show.

For example

Dummy_datas:

load

month(makedate(2019,rowno())) as Month,

'2019' as Year,

0 as Value

autogenerate (12);     // 12 lines for 12 months

left join distinct 

Item     // all Items in your data if you want to select

from your_table;

concatenate (your_table)      // add them to your existing datas

load * resident Dummy_datas;

drop table Dummy_datas;