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: 
Not applicable

Master calendar granularity

Hi everybody,

     I have found a cool tutorial on how to build a master calendar by Micheal Tarallo (Understanding the Master Calendar - Qlik Sense and QlikView - YouTube)

     Its very useful, however, I'm trying to apply that concept in one of my dashboards but failing to find the right way. I have tried to build on top of the tutorial dashboard (attached) but I've observed the same behaviour. I have notice that if I pull the your PRODUCT_ID into the dashboard as a filter (that's basically what I'm trying to implement on my dashboard) the calendar doesn't really keeps doing what its suppose to (fill gaps with the empty date) when you filter it by product. Instead, it only plots the days that contains data, which is exactly what the master calendar tries to avoid.

     Would anybody be so kind to share some wisdom and save me from insanity please ?

Nothing selected (oct showing blank [ GREAT ]);

Sales_NoSelection.jpg

Product_ID 15 selected (Gaps back into play [NO BUENO]);Sales_15Selected.jpg

Thanks in advance

Antonio

6 Replies
Michael_Tarallo
Employee
Employee

Taking a look

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

OK I see what you are saying - when you select a ProductID for example you only see the dates where a product was sold and not a continuous axis.

This is by design - as it is associating the values that are selected - however there should be a workaround for this. Many I searched for state needing to load 0 values manually for measures that do not have a value - and then use intervalmatch() - however let me check with HIC to see if there is a better / easier way.

hic‌ - can you assist? - When using a Master Calendar - how can you get it to fill in the missing date values when a selection occurs?

Regards,
Mike Tarallo
Qlik
hic
Former Employee
Former Employee

When you make a selection, some dates get excluded, and these are by default NOT shown on the x-axis. I can assure you that this is the way you want it to work in most cases - in cases where the dimension is discrete and non-numeric.

But you are right that dates are different: These are numeric and you want to show them spaced according their numeric value, so you get the proper gaps. To get this, you should check "Use Continuous Scale".

Continuous axis.png

Then you will get the spacing you want. For line charts there is however one more problem: A line will be drawn straight across the gap, connecting the data points. But you most likely want the gap to be empty. For this, there is a small trick: Change the measure to Sum(Sales) + Sum({1} 0).

Image4.png

HIC

Michael_Tarallo
Employee
Employee

Thank you HIC - this is perfect.

I attached another sample to the post using Sum(Sales) + Sum({1} 0) as the measure:

scroll with scroll wheel on mouse:

Regards,
Mike Tarallo
Qlik
jaws1990
Contributor II
Contributor II

This is a good solution to getting 0 values for those missing dates however it causes the x axes to always be from the minimum date dimension to the maximum date value.

SUM(Sales) + SUM({1} 0)

{1}.PNG

Normally when you apply the filters the x axes would shrink as appropriate. Any ideas on how to get around this or can we only have 1 or the other.

Without  + SUM({1} 0)Without + SUM({1} 0)

jaws1990
Contributor II
Contributor II

I managed to work out a way to be able to filter on the x axes and keep 0 values where there was no data for that month.

So instead of + SUM({1}0) I used

+ SUM({1<xAxisDimension={"$(=If(IsNull(GetFieldSelections(xAxisDimension)), '*', GetFieldSelections(xAxisDimension,'","')))"}>}0).

Hope it helps someone.