Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a graph that only shows more than one type of failure per user per day

I am using QlikView to analyze badge failures from a physical access control system log.  I am looking to create a graph that only shows more than one type of failure per user per day.

Under type of failures, it can be categorized as Lost, Expired or Disabled. In the log, under the field Category field, one of these types will be present.

I would like to create a graph that only shows more than 1 “Disabled” event per user per day

What would be the script to create this graph?  Does anyone have something similar that I could use as an example?

Thanks!!!

5 Replies
JonnyPoole
Former Employee
Former Employee

An IF statement in the chart expression will probably suffice ,

If (  count(distinct  total <User,Day>   [Category] )  > 0 ,  count(distinct  total <User,Day>   [Category] ) )

By not defining an 'else' condition the value for the user and day will be automatically null() which by default won't show in the chart

Assumes that you have a field called user and day in the chart as well.

Not applicable
Author

Where would I select “Disabled” from the Category field?

JonnyPoole
Former Employee
Former Employee

my oversight.  switch the expression to count 'Events' (if you have that field in your data set).  And use a SET MODIFIER to only count events where category=disabled.


If (  count(  {$<Category={'Disabled'}>} distinct  total <User,Day>   [EventId] )  > 0 ,  count( {$<Category={'Disabled'}>} distinct  total <User,Day>   [EventId] ) )


If your data fields aren't the same as these, kindly mock up an example in Excel and attach to the post.

Not applicable
Author

example.bmp

JonnyPoole
Former Employee
Former Employee

here is a sample. I needed to add an eventID to your data. I used the recno() function because it seems like each row in your data is a new event

LOAD

  RecNo() as EventID,

  A as Date,

     C as Category,

     D as User

FROM

(ooxml, no labels, table is Sheet1);

I made your data sample a bit bigger (attached). Also attached is the QVW . 

events.PNG.png