Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 ramrongala
		
			ramrongala
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Guys,
I struck some issue. here 1) i want display highest sum(sales) and corresponding Region in text object
2) i want calculate % but not using ''Relative'' in Expression tab . if any formula or code.
like below screen shots

In text i am using below code : "max(aggr( Sum( sales), Region))" it display only highest value but not region
i am using this code also: Aggr(max(aggr( Sum( sales), Region)),Region) but no use.
Please solve my problem ASAP Tomorrow i submit my project.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try with a lower case s in sales
FirstSortedValue(Region, -Aggr(Sum(sales), Region))
Max(Aggr(Sum(sales), Region))
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		1)
This will give you the region:
FirstSortedValue(Region, -Aggr(Sum(Sales), Region))
Max Sales
Max(Aggr(Sum(Sales), Region))
2) For percentage
Count(Region)/Count(TOTAL Region)
or check 'Relative' on the expression tab
 
					
				
		
 ramrongala
		
			ramrongala
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks Bro,
2nd one working fine. But 1st one not giving any value some error as come
 
					
				
		
 ramrongala
		
			ramrongala
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Error Message :Bad field name(s):sales
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try with a lower case s in sales
FirstSortedValue(Region, -Aggr(Sum(sales), Region))
Max(Aggr(Sum(sales), Region))
 
					
				
		
 ramrongala
		
			ramrongala
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Bro Really Thanks..working fine
 s4ni9r
		
			s4ni9r
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sunny Sir,
I have requirement,
| Item | URL | Style | Sales | 
| 10012 | Image1 | NY30 | 1000 | 
| 10013 | Image2 | NY30 | 550 | 
| 10014 | Image3 | NY30 | 4000 | 
| 10015 | Image4 | NY30 | 3000 | 
| 10016 | Image5 | NY30 | 10000 | 
| 10017 | Image6 | NY30 | 450 | 
| 10018 | Image7 | NY30 | 360 | 
| 10019 | Image8 | NY30 | 4000 | 
| 20019 | Image1 | NY50 | 4000 | 
| 20019 | Image2 | NY50 | 95000 | 
| 20019 | Image3 | NY50 | 1323 | 
| 20019 | Image4 | NY50 | 11200 | 
| 20019 | Image5 | NY50 | 7689 | 
Need to show the Image for Max Sales within each StyleCode,
Can we acheive without using FirstSortedValue?
