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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rangeavg in reverse

Hi Guys,

i have input table like

tab:

load * inline [

ID,Sale

1,100

2,200

3,500

4,600 ]

i need out put in pivot table like

ID                        4,3,2,1

Rangeavg         350,267,150,100

Regards,

Mahesh

1 Solution

Accepted Solutions
tresesco
MVP
MVP

6 Replies
tresesco
MVP
MVP

Try like:

Capture.PNG

antoniotiman
Master III
Master III

Hi Mahesh,

try this Expression

RangeAvg(Bottom(Sum(Sale),1,NoOfRows()-RowNo()+1))

Regards,

Antonio

Anil_Babu_Samineni

May be this?

RangeAvg(Below(Avg(Sale),0),Above(Sale,1,RowNo(Total)))

And if pivot table, Amy be this

RangeAvg(After(Sale,0,Count(TOTAL DISTINCT ID)))

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
Anil_Babu_Samineni

This may work Column level not the Row Level like Transpose for ID ??

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
antoniotiman
Master III
Master III

RangeAvg(Last(Sum(Sale),1,NoOfColumns()-ColumnNo()+1))

tresesco
MVP
MVP

And a more efficient expression could be :     RangeAvg(After(Sale,0,NoOfColumns()))