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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
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

11 Replies
Anil_Babu_Samineni

use this?

Avg(Aggr(If(Plan = 'Average', Sum(Deposits)), Month, Date))

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
sunny_talwar

I would suggest you to use set analysis like this

Avg({<Plan = {'Average'}>}Aggr(Sum({<Plan = {'Average'}>}Deposits), Month, Date)))

and you might also need to add Plan to the Aggr() function here

Avg({<Plan = {'Average'}>}Aggr(Sum({<Plan = {'Average'}>} Deposits), Month, Date, Plan)))