Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Set Analysis


I have a quick question regarding set analysis. I basically have 2 multiboxes where the user selects the week and day(s) of interest.

There is also a  multi-value slider for the hours of the day if the user chooses to drill down to a much lower level.

I am trying to do a simple count - it works fine when I only select 1 day and 1 hour (in the slider). However when I try to see the count for, eg a few days and from 1pm to 6pm, the expression breaks down.

I would appreciate any thoughts you may have on how to solve this.

Thank you

1 Reply
Valued Contributor II

Re: Set Analysis

Hi Rory,

To get things to work on selection of multiple days, you need to change your trigger a bit. I changed it to:

=chr(39) & concat(distinct Day, Chr(39) & ',' & chr(39)) & chr(39)

This will get the list of days that will work with the set analysis in your textboxes, and if no day is selected, it will count through all days.

Also, you needed to change your set analysis a bit to get the ranges, I changed the formula to:

='Test with Range of Hours'

&chr(10) & 'Process C'

&chr(10) &'Count of Entry:  ' & count({<Process_ID={'C'}  , Dummy_Start  = {$(vDay)} ,  Start_Hour={'>=$(=vHour_1)<=$(=vHour_2)'}  > } DISTINCT ID)

&chr(10) &'Count of Exit:  ' & count({<Process_ID={'C'}  , Dummy_End  = {$(=vDay)} ,  End_Hour ={'>=$(=vHour_1)<=$(=vHour_2)'}  > } DISTINCT ID)

Let me know if this works for you. Please find attached (See bottom 3 text boxes).