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: 
morenoju
Partner - Specialist
Partner - Specialist

Master Calendar with gaps in Qlik Sense

Hi all,

I'm using the following drill-down master dimension in a dashboard:

=Year(start_date)

=Month(start_date)

=start_date

In the load script I defined start date like this:

Date(Floor(start_timestamp)) AS start_date,

I'm using a master calendar I took from another thread of the Qlik Community. The problem I'm having in charts is that using the drill-down master dimension, whenever a certain day doesn't have values, I get a gap in my axis representation. No matter that I check "Include null values".

Do you think I may need to modify something in the master calendar?

Thanks,

Juan

1 Solution

Accepted Solutions
ToniKautto
Employee
Employee

My interpretation of this is that the gaps you see represents the fact that you have excluded the date values through selections. Naturally that is the default behavior, as the engine would aggregate based on your selections.

You can expand all values in the dimension if you need to, but you have to structure your data or measures in a way that allows for it. For example take a look at Re: QlikSense Dimension: show all values like QlikView? for a basic example on how to expand all values on in a dimension.

View solution in original post

4 Replies
morenoju
Partner - Specialist
Partner - Specialist
Author

This is my master calendar:

QuartersMap: 

MAPPING LOAD  

rowno() as Month, 

'Q' & Ceil (rowno()/3) as Quarter 

AUTOGENERATE (12); 

     

Temp: 

Load 

min(start_date) as minDate, 

max(start_date) as maxDate 

Resident event; 

     

Let varMinDate = Num(Peek('minDate', 0, 'Temp')); 

Let varMaxDate = Num(Peek('maxDate', 0, 'Temp')); 

DROP Table Temp; 

     

TempCalendar: 

LOAD 

$(varMinDate) + Iterno()-1 As Num, 

Date($(varMinDate) + IterNo() - 1) as TempDate 

AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate); 

     

MasterCalendar: 

Load 

  TempDate AS start_date, 

  week(TempDate) As Week, 

  Year(TempDate) As Year, 

  Month(TempDate) As Month, 

  Day(TempDate) As Day, 

  ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter, 

  Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear, 

  WeekDay(TempDate) as WeekDay 

Resident TempCalendar 

Order By TempDate ASC; 

Drop Table TempCalendar; 

morenoju
Partner - Specialist
Partner - Specialist
Author

After reading this thread "problem with master calendar and filtered data | Qlik Community" I've seen that the problem happens only when filtering. Apparently, it's the standard behavior in Qlik.

ToniKautto
Employee
Employee

My interpretation of this is that the gaps you see represents the fact that you have excluded the date values through selections. Naturally that is the default behavior, as the engine would aggregate based on your selections.

You can expand all values in the dimension if you need to, but you have to structure your data or measures in a way that allows for it. For example take a look at Re: QlikSense Dimension: show all values like QlikView? for a basic example on how to expand all values on in a dimension.

morenoju
Partner - Specialist
Partner - Specialist
Author

I expanded the dimension following the example in your link. I had to do a small change in the master dimension, but it works as I wanted:

=Year(start_date)

=Month(start_date)

=Day

Thanks,

Juan