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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

6 Replies
tresB
Champion III
Champion III

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
MVP
MVP

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
MVP
MVP

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))

tresB
Champion III
Champion III

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