Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find the frequency by aggregation

Hi, I have some transaction records. I would like to find the frequency of the customer.

Customer ID          Date          Amount

A                    12/07/2017    1000

B                    14/07/2017    2000

A                    15/07/2017    3000

C                    16/07/2017    4000

C                    13/07/2017    5000

C                    12/07/2017    6000

C                    17/07/2017    9000

Expression I used to find out frequency : aggr(Count(Distinct [Date]), [Customer ID ])

Customer ID, Frequency

A, 2

B, 1

C, 4

What is the expression to find out the average of frequency (2.3)  and medium of frequency (2)?

Thanks.

Labels (1)
2 Replies
sunny_talwar
MVP
MVP

May be this

Avg(Aggr(Count(Distinct [Date]), [Customer ID ]))

Or this within the chart

Avg(TOTAL Aggr(Count(Distinct [Date]), [Customer ID ]))

sunny_talwar
MVP
MVP

For Median

Median(Aggr(Count(Distinct [Date]), [Customer ID ]))

or

Median(TOTAL Aggr(Count(Distinct [Date]), [Customer ID ]))