Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate aggr average

Hi all,

I am having an issue with trying to figure out the following scenario.

I have a line chart that shows a rate by month for a given selected year. The customer wants to be able to calculate the average for the entire previous year and use that as measure for the current year and plot that across the entire year to use as a benchmark.

2015

Jan  10%

Feb  5%

Mar  6%

Apr  12%

May 13%

Jun  14%

Jul   15%

Aug  17%

Sep  6%

Oct   5%

Nov  11%

Dec  6%

Average = 10% ( plot 10% across entire graph for 2017, month selection should be ignored)

=AVG(total aggr($(vRate),[Month of Year]))  when I use this expression I am able to get the avg rate, however the when I select month , the function is not ignoring the set analysis for month.

vRate = sum({< [Month of Year]=>}[READM_IND]) /sum({< [Month of Year]=>}[IND])

Any help would be greatly appreciated.

Thanks

1 Solution

Accepted Solutions
Kushal_Chawda

also exclude the selection in outer aggregation function

AVG({< [Month of Year]=>} total aggr($(vRate),[Month of Year]))

View solution in original post

2 Replies
Kushal_Chawda

also exclude the selection in outer aggregation function

AVG({< [Month of Year]=>} total aggr($(vRate),[Month of Year]))

Not applicable
Author

Thanks alot!!!!