Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis expression to calculate the average

Hello,

I was wondering if I could get some help please.

I am attempting to use an expression to calculate the average total sales for the month in qlikview to put in my summary table.

The raw data displays multiple sales for each day. So I would need to first sum the sales for each business day and then calculate the average for total sales for each day of that month. I have attached an example of the raw data and the desired result which can be achieved in excel. I would like to identify a simple expression to perform this calculation so that I can add it to my pivot summary table in qlikview.

Thanks,

Esther

1 Solution

Accepted Solutions
sunny_talwar

May be this

Avg(Aggr(Sum(Deposits), Month, Date))

View solution in original post

11 Replies
Anil_Babu_Samineni

I am attempting to use an expression to calculate the average total sales for the month in qlikview to put in my summary table.

Avg({<Month = {$(=Max(Month))}>} TOTAL [Sum of Deposits])

OR

Avg(TOTAL [Sum of Deposits])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
devarasu07
Master II
Master II

Hi,

you can try like below

sum(Deposits) / count(total distinct Month)

Capture.JPG

Anonymous
Not applicable
Author

Hello,

I attempted your above formula but it returned no results.

deposits.PNG

sunny_talwar

Do you have a month field in your dashboard? May be it is called Month or MONTH?

Anonymous
Not applicable
Author

Yes I do.

I want to get the result in bold (see screenshot below)in my pivot table but have been unable to get

my expression to work.

Average.PNG

Anonymous
Not applicable
Author

The result in bold is the average total for the deposits.

sunny_talwar

May be this

Avg(Aggr(Sum(Deposits), Month, Date))

Anonymous
Not applicable
Author

Thank you!

Anonymous
Not applicable
Author

Hello,

The formula works but I am unable to use it in my pivot summary table. Do you know why this could be?

The expression that i am using is this if(Plan='Average',Avg(Aggr(Sum(Deposits), Month, Date)))

Average.PNG

Thanks