Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 rcandeo
		
			rcandeo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have to put a KPI inside a text box showing the country that has the most growth comparing actual year x prior year.
I use this expression below in a chart straight table and it works using a dimension limits for 1 largest value.
(sum({<[Year] = {'$(vCurrentYear)'}>} amount) - sum({<[Year] = {'$(vPriorYear)'}>} amount))
/
sum({<[Year] = {'$(vPriorYear)'}>} amount)
But how to put this expression showing the Country as below without having the dimension limits for largest valeu, as this is not a chart table anymore?
China - 23.42%
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How about this:
FirstSortedValue(Country, -Aggr(
(sum({<[Year] = {'$(vCurrentYear)'}>} amount) - sum({<[Year] = {'$(vPriorYear)'}>} amount))
/
sum({<[Year] = {'$(vPriorYear)'}>} amount),
Country))
 
					
				
		
Hi
Use Rank function
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How about this:
FirstSortedValue(Country, -Aggr(
(sum({<[Year] = {'$(vCurrentYear)'}>} amount) - sum({<[Year] = {'$(vPriorYear)'}>} amount))
/
sum({<[Year] = {'$(vPriorYear)'}>} amount),
Country))
 
					
				
		
 agomes1971
		
			agomes1971
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
try
= yourcountryfield & ' - ' &
num((sum({<[Year] = {'$(vCurrentYear)'}>} amount) - sum({<[Year] = {'$(vPriorYear)'}>} amount))
/
sum({<[Year] = {'$(vPriorYear)'}>} amount), #.##0,00%)
HTH
André Gomes
 antoniotiman
		
			antoniotiman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
try
FirstSortedValue(DISTINCT Country,-Aggr(YourExpression,Country))
 Gysbert_Wassena
		
			Gysbert_WassenaPerhaps like this:
vExpr1: sum({<[Year] = {'$(vCurrentYear)'}, >} amount)/sum({<[Year] = {'$(vPriorYear)'}>} amount) - 1
=Only({<Country={"=rank($(vExpr1))=1"}>}Country) & ' - ' &
num( sum({<[Year] = {'$(vCurrentYear)'}, Country={"=rank($(vExpr1))=1"}>} amount)/sum({<[Year] = {'$(vPriorYear)'}, Country={"=rank($(vExpr1))=1"}>} amount) - 1 ,'0.00%')
 
					
				
		
 rcandeo
		
			rcandeo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This gave the country, but I am not being able to show the number beside, can you help me again?
 Gysbert_Wassena
		
			Gysbert_Wassenause max instead of firstsortedvalue and remove the first argument and the comma of course and the minus ( - ) character.
 
					
				
		
 rcandeo
		
			rcandeo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I had a null value in this expression, but thank you for all
 
					
				
		
 rcandeo
		
			rcandeo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you very much
