Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
pascalschwegler
New Contributor III

How to count exceptions in columns based on another column

Hi Community,

I have got two columns:

Complexnr ; Year of construction

3001 ; 1990

3002 ; 1993

3001 ; 1990

3003 ; 1995

3005 ; 2000

3001 ; 1991

3008 ; 2005

3001 ; 1990

3002 ; 1993

3003 ; 1995

3009 ; 2007

etc.

I would like to count rows of different construction year when Complexnr is the same.

In my example: complexnr has 2 different Years of construction.


Could anybody help me? Thanks in advance!

Grtz. Pascal

1 Solution

Accepted Solutions
Employee
Employee

Re: How to count exceptions in columns based on another column

Try setting up your visualization like this...

Dimension: complexnr

Measure: Count(DISTINCT [Year of construction])

View solution in original post

3 Replies
Employee
Employee

Re: How to count exceptions in columns based on another column

I'm not completely clear on what you are looking for.

Could you givean example of what result you expect to see in the table?

pascalschwegler
New Contributor III

Re: How to count exceptions in columns based on another column

Sorry. I see it's not that clear..

I would like to create an KPI object which will count different years of construction based on the same complexnr.

In my example:

When complexnr = 3001, the KPI most give me 2 as answer (1990 and 1991).

I hope it is more clear now.

Thanks in advance

Grtz. Pascal

Employee
Employee

Re: How to count exceptions in columns based on another column

Try setting up your visualization like this...

Dimension: complexnr

Measure: Count(DISTINCT [Year of construction])

View solution in original post