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

Range Average Qlikview

I am trying to calculate a moving average for customers. I want my table to show me the average of each customer based on his previous months data available. When I make a selection of a particular customer the table works fine. But problem arises when there is no selection on Contract. The table does not aggregate the moving average w.r.t to Customers. The query that i am currently using, which works fine for each Contract when selected, is:

Rangeavg(Above(TOTAL Sum(UnitBilled), 1, Rowno(TOTAL)))

However when there is no selection made the table shows the following details:

For each contract i want the table to show his own moving average. Like it is doing so for A in the above table.

Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try removing the totals from the expression so the rangeavg does not cross the borders of the contact dimension:

Rangeavg(Above(Sum(UnitBilled), 1, Rowno()))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try removing the totals from the expression so the rangeavg does not cross the borders of the contact dimension:

Rangeavg(Above(Sum(UnitBilled), 1, Rowno()))


talk is cheap, supply exceeds demand
Not applicable
Author

thank you Gysbert, it worked!