Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

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
Highlighted
Specialist II
Specialist II

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.

Highlighted
Partner
Partner

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