Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Qliksense_77
		
			Qliksense_77
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I want to colour text in pivot. If the department is above average for the year the colour should be red. And green if the department is under average for the year. It should be like "2019" below, where the average for year is 1,63 and departments under is red and departsments above is green.
I cant get a text clouring expression to work. Anybody that can help?
 JuanGerardo
		
			JuanGerardo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi @Qliksense_77, I think you should use the TOTAL modifier in your aggregation, something like:
If(
   Sum(expenses) / Sum(units) >=
      Sum(TOTAL <Year> expenses) / Sum(TOTAL <Year> units),
   Green(),
   Red()
   )JG
 JuanGerardo
		
			JuanGerardo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi @Qliksense_77, I think you should use the TOTAL modifier in your aggregation, something like:
If(
   Sum(expenses) / Sum(units) >=
      Sum(TOTAL <Year> expenses) / Sum(TOTAL <Year> units),
   Green(),
   Red()
   )JG
 Qliksense_77
		
			Qliksense_77
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		