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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate daily average in a table

my table looks like this:

Date,Person,Revenue

2015.01.01,A,100

2015.01.01,A,99

2015.01.01,B,98

2015.01.02,A,87

2015.01.02,B,88

2015.01.03,B,70

I want to get the average of daily total revenue for A and B

The daily sum of revenue is

2015.01.01,A,199

2015.01.01,B,98

2015.01.02,A,87

2015.01.02,B,88

2015.03.03,A,0

2015.01.03,B,70

so the result should look like

Person,DailyAverage

A,95

B,85

how to get the final result in one go?

I am thinking of average(aggr(sum(Revenue),Date)) - but it doesn't work.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use Person as dimension and avg(aggr(sum(Revenue),Date,Person)) as expression.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
nirmalraj_kj
Partner - Contributor III
Partner - Contributor III

Hi Humbug

  Could you find the attachment hope it helps you

Thanks & regards

Nirmal Raj

robert_mika
Master III
Master III

Use Person as Diemnsion

and as expression

Aggr(Avg(Revenue),Person)

21-May-15 7-57-49 AM.jpg

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use Person as dimension and avg(aggr(sum(Revenue),Date,Person)) as expression.


talk is cheap, supply exceeds demand