Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
roxys373s
Contributor II
Contributor II

Taking Average Principal

Hello,

 

I am having a problem with calculating an average. I need to calculate the average of the sum(sales) of every day.

So lets say 7/15/22 has sales: 34000, 45000, 23500

and 7/16/22: 1000, 60000, 35600 

 

then the average should be 99,500 instead of 33,183 (should divide by 2 days rather than 6 sales).

 

How can I write this formula in my KPI?

Labels (5)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Sum(Sales) / Count(distinct Date)

or

Avg(Aggr(Sum(Sales),Date))

See also https://community.qlik.com/t5/Qlik-Design-Blog/Average-Which-average/ba-p/1466654

View solution in original post

1 Reply
hic
Former Employee
Former Employee

Sum(Sales) / Count(distinct Date)

or

Avg(Aggr(Sum(Sales),Date))

See also https://community.qlik.com/t5/Qlik-Design-Blog/Average-Which-average/ba-p/1466654