Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
.png) Sunil_Kenth
		
			Sunil_Kenth
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am trying to colour the background of a cell in a straight table if the dimension equals a certain value.
I have clicked on + sign next to my demonsion name and then double clicked on Background and entered the following expression:
=if(((Brand)"Mazda"), LightRed)
I get the message saying error in expression.
Can you tell me what i'm doing wrong?
Thanks,
Sunil
 
					
				
		
 IAMDV
		
			IAMDV
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 IAMDV
		
			IAMDV
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This should work...
=if(Brand = 'Mazda', LightRed())
Thanks,
DV
.png) Sunil_Kenth
		
			Sunil_Kenth
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Got it working using the following expression:
=if( Brand = 'Mazda', green(), 
if( Brand = 'Ford', green(), 
if( Brand = 'BMW', green(),white()
))) 
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You need to write
=IF( Brand = 'Mazda', Lightred())
Rgds
Anand
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Use this
=If( Brand = 'Mazda' or Brand = 'Ford' or Brand = 'BMW', green(),white())
Rgds
Anand
 SunilChauhan
		
			SunilChauhan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		if(((Brand)="Mazda"), Rgb(255,102,102))
 
					
				
		
 IAMDV
		
			IAMDV
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sunil - If you have massive dataset, then you need to Load the Colors within the Script instead of using the IF - conditional statement. This will improve the performance compared to using the IF statements.
I hope this helps!
Cheers - DV
.png) Sunil_Kenth
		
			Sunil_Kenth
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks DV.
The data set isn’t that huge so it’s performance is fine.
Thanks,
Sunil
 
					
				
		
As a matter of performance, try avoid using 'if' and use pick/match instead:
pick(match(Brand, 'Mazda'), lightred())
Regards,
Gordon
