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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
jasonrimkus
Contributor II
Contributor II

Above() Below() against a dimension

I'm trying to compare where a particular store's Count(CustomerID)  fits within the average of a subset of stores.  

In the table, i'd like to show how the Count(CustomerID) compares to the average +/- 5 of the store's ranked sales.  So for example, if i'm looking at store 6, i'd want to calculate the % difference between Store 6 and the average for Stores 1 through 11.  If store 7, stores 2-12; store 8, stores 3-13 and so on.  What would be the expression to calculate the average across those stores based on the CurrYr_RankSales?  

 

I'm assuming its Above() and Below(), but i'm at a loss on how to calculate it across the CurrYr_RankSales dimension.

StoreCurrYr_RankSalesCount(CustomerID)
Store11158
Store2291
Store3350
Store44282
Store55475
Store66202
Store77291
Store888
Store99387
Store101076
Store111181
Store121243
Store1313129
Store1414194
Store1515210
Store1616364
Store171777
Store1818188
Store1919227
Store2020446
Store2121178
Store2222221
Store2323138
Store2424105
1 Reply
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @jasonrimkus, I suppose you need a combination of Above and RangeAvg:

RangeAvg(Above(Count(CustomerID), 5, 12))

JG