Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Not applicable

Correctly view/suppress dimensions/expression

I have a chart with the date on X-axis and a log count on the Y-axis, that differentiates the log count by a RuleID associated with each log. So, in QlikView lingo:

   Dimension 1: Day

   Dimension 2: RuleID (Can be filtered)

   Expression 1:Count (Logs)

Problem: In my initial implementation I was seeing day columns being added/removed based on the rules I was filtering. I need these to be consistent to always display the Day on the X-axis (even if there are no logs, or no logs for selected RuleID filter for that day). Once that is the case, when I filter down the RuleID only selected RuleID's should be listed in the legend

Here are some of my results:

First shows that I have filtered down to just RuleID 10052. But you can see from the second shot, that if I add RuleID 500 it now displays another column that was suppressed in the first one because the value was 0.

KeepDatesFilterRules.jpg

In the bottom one, I tried this expression to essentially always keep the column (even when date is 0 with RuleID filter), but only show values from the filter:

= if (Count( {<RuleID=>} EventID ) >= 0,

      Count( EventID ))

This results in every possible RuleID listed in the legend rather than the ones I have filtered. Plus this seems like a hack because I don't fully understand how it should be implemented.

I am sure I am just missing something basic...so, please set me straight. 🙂

Tags (1)
4 Replies
Highlighted
Not applicable

Re: Correctly view/suppress dimensions/expression

you can resolve this in two ways,

1. creating zero values for all missing combinations of logid/date in data model

2. you can modify set  to force include missing dates

ex: sum(logcount)-sum({1}0)  (you can also just ignore the date field in the 0 expression

Highlighted
Not applicable

Re: Re: Correctly view/suppress dimensions/expression

How exactly would I pad my calendar table to make sure that all dates are included even if there was no log associated with that date?  This is a small portion of my data model and how I create the calendar table.

DataModel.jpg

Highlighted

Re: Correctly view/suppress dimensions/expression

Highlighted
Not applicable

Re: Re: Correctly view/suppress dimensions/expression

Generating Missing Data In QlikView

this might be helpful for you..

also google for 'infinityinsight blog' post on missing values.