Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Set Analysis problem

Hi,

I have the following scenario:

1. Log which collects series of events on a system:

  • tovDtKomenTimeNum - Timestamp of event
  • tovCode - Code of event. e.g.TOV01 - low oil pressure


2. Log which collects series of Error occurrences on a system

  • StoringenTimeNum - Timestampt of error event
  • def_code - code of error event - e.g. STOR01 - Brakes failure


3. The two timelines are parallel and linked through SystemID

4. we would like to show the number of error events occurred between events

5. The threshold is determined by two variables:

  • SecondenVoorDefect - Seconds before the error event
  • SecondenNaDefect - Seconds After the error event


6. The following chart expression works...

Count(if(StoringenTimeNum >= tovDtKomenTimeNum - (SecondenVoorDefect/86400.0304128) and StoringenTimeNum <= tovDtKomenTimeNum + (SecondenNaDefect/86400.0304128),def_code))

however. seeing the sheer data volume (Millions of systems events and millions of system error events), we're considering to switch over to set analysis expression. This however does not work

=Count({<StoringenTimeNum = {'>= $(tovDtKomenTimeNum - ($(SecondenVoorDefect) / 86400.0304128))

<= $(tovDtKomenTimeNum + ($(SecondenVoorDefect) / 86400.0304128))'} >} def_code)



Any ideas how to crack this?

Many thanks,

Dror

4 Replies
MVP
MVP

Set Analysis problem

Hello Dror,

Your syntax seems fine to me, except for the variable expansion or calculation, try this one

Count({< StoringenTimeNum = {'>=$(=tovDtKomenTimeNum - (SecondenVoorDefect / 86400.0304128))<=$(=tovDtKomenTimeNum + (SecondenVoorDefect / 86400.0304128))'} >} def_code)


Hope it helps

Not applicable

Set Analysis problem

Hi Miquel,

Thanks for your quick reply. Unfortunatly it stil doesn't work. Get "No data to display" in the chart

I'll look further into it.

Dror

MVP
MVP

Set Analysis problem

Hello Dror,

It would be easier if you could post a document with some sample data. Note, for exmaple, that you are using in the expression above the dot as decimal separator for the number of seconds per day, and that the field and variables must have the same time/date format.

Hope this helps.

Not applicable

Set Analysis problem

Hi,

I have posted an sample file. Hope this can give you an idea. cause i'm totally lost...





Dror

Community Browser