Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 wisetrackchile
		
			wisetrackchile
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Please help me:
I am using "Color by expression" but the graphics are gray
The Dimension:
=if((DRIVERTIME < 341),'LOW',
if((DRIVERTIME >= 341) And (DRIVERTIME < 361),'MEDIUM',
if((DRIVERTIME >= 361),'HIGH')))
The Measure:
=Count(TRIPS)
Color by expression:
=if((DRIVERTIME < 341),Green(),
if((DRIVERTIME >= 341) And (DRIVERTIME < 361),Yellow(),
if((DRIVERTIME >= 361),Red())))

THANKS!!
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Because the color expression is calculating over multiple rows, you must do some sort of aggregation over DRIVERTIME. As you have it now in the IF(), DRIVERTIME will return null when there are multiple rows. Try using "Avg(DRIVERTIME)" in your color expression.
-Rob
 
					
				
		
I would suggest finding the RGB value of the colour and using that e.g.
if("Gender"='Male',rgb(68,119,170),if("Gender"='Female',rgb(204,102,119), rgb(253,219,102)))
 wisetrackchile
		
			wisetrackchile
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Bella, thanks
I also tried that option, but it does not work either 
Rodrigo
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Because the color expression is calculating over multiple rows, you must do some sort of aggregation over DRIVERTIME. As you have it now in the IF(), DRIVERTIME will return null when there are multiple rows. Try using "Avg(DRIVERTIME)" in your color expression.
-Rob
 prithviram777
		
			prithviram777
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Please check if this might be the reason.
Are you using alternative dimension?
 wisetrackchile
		
			wisetrackchile
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Eureka !!!  That was the problem, thank you very much!!!
 That was the problem, thank you very much!!! 
 prithviram777
		
			prithviram777
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If you found the document clip useful, please mark my response as correct or appropriate.
Thank you
 mjtaft2017
		
			mjtaft2017
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Please mark Rob Wunderlich's response as correct since you indicated that resolved your question. I selected this question because it was still marked as unanswered - but upon reading it, you did get a correct response and it just needs to be marked.
Thank you.
