Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
simbai94
Contributor II
Contributor II

COUNT IF Expression

Good Morning,

I have a table with the fields: Site Code, Fault and Months i.e January,Feb, Mar.....Dec.

I would like to create a pivot/chart which shows something like this:

Site CodeFaultJanuaryFebruaryMarchApril
ZM001Transmission FAULT11122516
AC Fault0203
Water Pump Fault0000
ZM002Transmission FAULT1822920
AC Fault2232
Water Pump Fault0101
ZM003Transmission FAULT816129
AC Fault1100
Water Pump Fault2000

So my raw table just contains the Site Codes (ZM001,ZM002.......)  and faults i.e (Transmission Fault, AC fault and Water pump fault.) I would like to produce a table like the one above which will show me the number of times a particular fault occurred over the months based on Site Code. I would then also want to flag or filter those Faults whose count is greater than 10 in a given month and perharps label them as "Violating".

Your assistance would be greatly appreciated. Thanks!

2 Replies
JustinDallas
Specialist III
Specialist III

I'm not sure this is a question.  In any case, have you tried looking at the Pivot Table component?  That's where I would start.

dplr-rn
Partner - Master III
Partner - Master III

Like justin mentioned using pivot table with month as column dimension should give you the look.

But What do you mean by 'label them as Violating'?

     if you mean in script Not knowing your data model hard to give a suggestion.

     if just on the UI. why not change background color e.g. show background color are red if greater than 10