Skip to main content
Announcements
Discover what’s possible with embedded analytics! March 6, 10 AM ET SIGN UP!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I colour certain sections on a line graph if dates are grouped by MonthStart?

Hi,

I have built a line graph of Month Complaint Raised (X axis) against Number of Complaints (Y axis). The dimension for the graph is MonthStart([Date_Comp_Raised]) and the expression is count(Complaint_Number).

Would it be possible to use an expression to colour certain date periods different colours?

I have used the following expression: if([Date_Comp_Raised] >= date(42234) and [Date_Comp_Raised] <= date(42447), rgb(96,162,80),black()). This works if the dates aren't grouped by 'MonthStart' but when they are the whole graph turns black.

Can anyone help me colour different dates ranges still using MonthStart?

Thanks in advance,

Paul

Labels (1)
0 Replies