Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 guruprem
		
			guruprem
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am Analyzing Weather data. I would like to display max temperature and place where this recorded.
For Max temp I used : Max([Inst Air Temp]) -- Working fine
Question is how to get place of max temp? I tried: Firstsortedvalue(STATN_ID,-[Inst Air Temp]) - No data displayed
Only({$ <[Inst Air Temp] = {$(=Max([Inst Air Temp]))} >} STATN_ID) -- No data
Please Help to get place where max temp is recorded?
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have you tried Firstsortedvalue(distinct STATN_ID,-[Inst Air Temp]) . this statement will look like giving error, but it will work
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have you tried Firstsortedvalue(distinct STATN_ID,-[Inst Air Temp]) . this statement will look like giving error, but it will work
 
					
				
		
 sibideepak
		
			sibideepak
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How do you want to show in front end means which object you're using ..if you are using any charts, dimension may be your problem.
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Firstsortedvalue() should work. Are you trying in a chart/textbox? If there are multiple places with max temp, you might try like:
Firstsortedvalue(Distinct STATN_ID,-[Inst Air Temp])
You would get a syntax warning in red, ignore that.
 
					
				
		
 sibideepak
		
			sibideepak
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It will work for sure..
FirstSortedValue( STATN_ID,-Aggr(Max([Inst Air Temp]),STATN_ID))
 
					
				
		
If you want it in a chart, then
Dimension -> STATN_ID
Expression -> Only({<[Inst Air Temp]={$(#=Max(TOTAL [Inst Air Temp]))}>}[Inst Air Temp])
If there are multiple places with same temperature which is maximum, then FirstSortedValue() will display only one among those in text box.
Regards,
KKR
