Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Tags (3)
1 Solution

Accepted Solutions
Employee
Employee

Re: Invisible Measures

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

4 Replies

Re: Invisible Measures

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

Re: Invisible Measures

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

Employee
Employee

Re: Invisible Measures

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

Re: Invisible Measures

Thank you very very much Josh that is perfect!