Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi i have table like
products,amount
apple,100
banana,200
orange,300
.
.
.
.
.
finapple,100 like this i have 100 rows of data
i want top 5 and top 10 avg sales
give me expr?
 
					
				
		
=avg({<products={"=rank(avg(amount))<=5'}>}amount)
 
					
				
		
 giakoum
		
			giakoum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		in a chart?
use avg(amount) as expression
products as dimension
and use the dimension limit tab to limit it to the first 5 or 10
 
					
				
		
thats ok fine instead of using dimension limit i want write a expression
 
					
				
		
 mdmukramali
		
			mdmukramali
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear,
Use can use
=Sum({<Products = {"=Rank(Sum(amount)/ Sum(TOTAL amount))<=5"}>} amount) / Sum(TOTAL amount)
 
					
				
		
 giakoum
		
			giakoum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		An expression in a text object for example, will return a single number. What is it exactly that you want to do?
 
					
				
		
try this,
=if(rank(avg(sales))<=5,avg(sales))
 
					
				
		
here i am getting other record names also including top5
for top5 i can see bars
but for rest of the things i am getting products name , i want remove all things i want see only top 5 in the chart
 
					
				
		
 giakoum
		
			giakoum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		=if(rank(avg(sales))<=5,avg(sales),null())
and use suppress missing
 
					
				
		
=avg({<products={"=rank(avg(amount))<=5'}>}amount)
