Announcements
cancel
Showing results 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
MVP

May be this

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

11 Replies
 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
Master II

Hi,

you can try like below

sum(Deposits) / count(total distinct Month)

Anonymous
Not applicable
Author

Hello,

MVP

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.

Anonymous
Not applicable
Author

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

MVP

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)))

Thanks

Community Browser