Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have a chart with a dimension of Monthname(Date), I want to set the backcolor of an expression depending upon what month it is, however i cant work it out. I have used the following expression
if(MonthName(myDate) ='Oct 2007' Or MonthName(myDate) = 'Nov 2007' , LightRed),
Can anyone please advise, I take it its because 'Oct 2007' is being read as a string as opposed to the date but i'm not sure how to go about converting it into the correct date type.
thanks
Hi,
the colour-names are functions and need to end with () , thus your example should work with:
if(MonthName(myDate) ='Oct 2007' Or MonthName(myDate) = 'Nov 2007' , LightRed()),
HTH
Peter
Hi Peter,
Sorry the missing brackets were a typo, it still doesn't work with the brackets, any ideas why?
Thanks
Hi onlyone,
see the attached example. Is this kind of coloring what you want to have?
Rainer