Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Invisible Measures

Hi All,


Just got hold of Qlik Sense and I am trying to replicate a graph I created in Qlikview.

In order for the graph to work I had to have a second measure which was invisible, in order to ensure 0s are shown for months with no data.

How would I achieve this in Sense? I can add the second measure but arrows appear to indicate data above the first measures scale.

I do have a master calendar in place but this does not seem to help

All help welcome

Toby

1 Solution

Accepted Solutions
Josh_Good
Employee
Employee

Hi Toby,

The issue is arising because the set analysis is like making a selection so you are effectively 'selecting out' the dates with zero in them.  One trick that works is to add and subtract the same value to get to zero and keep all the dates.  In your case it would be like this:

count(

  {<

    DateRaisedIMS={">=$(=MonthStart(Today(),-11))<=(=MonthEnd(Today())"},

    ValueID={'*24*'},

    IncidentType={'*Accident*'},

    ListTitle={'*Employee*'}

    >}

ValueID)

+ Count({<DateRaisedIMS={">=$(=MonthStart(Today(),-11))<=(=MonthEnd(Today())"}>}ValueID)

- Count({<DateRaisedIMS={">=$(=MonthStart(Today(),-11))<=(=MonthEnd(Today())"}>}ValueID)

I've also attached a QVF example for you.

-Josh

Qlik

View solution in original post

4 Replies
Gysbert_Wassenaar

Can you post the Qlikview example so I have an idea of what you're trying to achieve in Qlik Sense?


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert

Find attached the Qlikview file, example graph is on the RIDDOR Details tab

You will see Dec and Jul as 0 but this only shows with the extra invisible measure

Thanks

Toby

Josh_Good
Employee
Employee

Hi Toby,

The issue is arising because the set analysis is like making a selection so you are effectively 'selecting out' the dates with zero in them.  One trick that works is to add and subtract the same value to get to zero and keep all the dates.  In your case it would be like this:

count(

  {<

    DateRaisedIMS={">=$(=MonthStart(Today(),-11))<=(=MonthEnd(Today())"},

    ValueID={'*24*'},

    IncidentType={'*Accident*'},

    ListTitle={'*Employee*'}

    >}

ValueID)

+ Count({<DateRaisedIMS={">=$(=MonthStart(Today(),-11))<=(=MonthEnd(Today())"}>}ValueID)

- Count({<DateRaisedIMS={">=$(=MonthStart(Today(),-11))<=(=MonthEnd(Today())"}>}ValueID)

I've also attached a QVF example for you.

-Josh

Qlik

Not applicable
Author

Thank you very very much Josh that is perfect!