Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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())
could you please share screen shot to know that exactly what happening.
You have only supplied a colour (yellow) when the IF statement is true, but no colour for false.
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??
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??
=MONTHEND(Max_Date) is 29/02/2016
you can try it;
right click on dimension --->go to Custom format cell ,
from here you can provide background colour as per your requirement.
Thanks but then I will have to do that every time I run a report for a new month