Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 tinkerz1
		
			tinkerz1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I use the below code to make the date dimension in a pivot table, but the following code for coloring the backgorund for dates only works on the first 2 dates, what could be happening not to color the full selection?
=if(Num([Download Month-Year])>=num(MONTHSTART(Min_Date)) and Num([Download Month-Year])<=num(MONTHEND(Max_Date)),[MonthYear])
=if(Num([Download Month-Year])>=num(MONTHSTART(Min_Date)) and Num([Download Month-Year])<=num(MONTHEND(Max_Date)),Yellow())
 
					
				
		
 tyagishaila
		
			tyagishaila
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		could you please share screen shot to know that exactly what happening.
 
					
				
		
 roger_stone
		
			roger_stone
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You have only supplied a colour (yellow) when the IF statement is true, but no colour for false.
 tinkerz1
		
			tinkerz1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		For information this is the new background code:
=if(Num([Download Month-Year])>=num(MONTHSTART(Min_Date)) and Num([Download Month-Year])<=num(MONTHEND(Max_Date)),Yellow(),red())
But the dates stayed white.
 
					
				
		
what is the max value of your date field??
 
					
				
		
 roger_stone
		
			roger_stone
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Looking at that screenshot, I think this may have more to do with nulls in your data.
 
					
				
		
From your background code, and attached image:
=if(Num([Download Month-Year])>=num(MONTHSTART(Min_Date)) and Num([Download Month-Year])<=num(MONTHEND(Max_Date)),Yellow(),red())
It seems the max value of Date Field is Oct 2015 only, is it??
 tinkerz1
		
			tinkerz1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
=MONTHEND(Max_Date) is 29/02/2016
 
					
				
		
 tyagishaila
		
			tyagishaila
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		you can try it;
right click on dimension --->go to Custom format cell ,
from here you can provide background colour as per your requirement.
 tinkerz1
		
			tinkerz1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks but then I will have to do that every time I run a report for a new month
