Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Case for aggr function?

Hi friends,

I am trying to count distinct number of events per year based on a date, but there is a problem when it is used the regular count ( Distinct "dimension") in expression chart.

Below is the fact table:

IDDateEventControl
A01/01/2015X1
A01/01/2015X2
A01/01/2015X3
A03/07/2015X1
A03/07/2015X2
B02/01/2015Z1
B02/01/2015Z2
C02/10/2015X1
B10/10/2015X1
B10/10/2015X2

So, in this case, when I use the expression Count ( distinct ID), having the dimension year(Date) and Event, the result is:

A = 1

B = 1

C = 1

But the desirable result is:

A = 2

B = 2

C = 1

Does anyone have an idea of what can be done?

Thanks in advance.

3 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Try count(distinct Date) as expression with ID as dimension


talk is cheap, supply exceeds demand
Highlighted
Master II
Master II

Straight Table:

Dim = ID

Exp1 = count(aggr( ID,Date))

Unbenannt.png

Highlighted
Creator II
Creator II

Thanks friends,

I forgot to include that the result will be shown in a chart like this:

event.png