Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN 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
Employee
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
Employee
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
Employee
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