Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a chart that shows a count by month with overlapping years.
I've been asked to specify the line color by year.
2015 = blue
2016 = yellow
2017 = red
I've been trying to color by dimension and by expression but I'm missing something.
This color by expression gives me yellow for all lines:
if(Year(Date)='2015'
,blue()
,if(Year(Date)='2016'
,yellow()
,red()
)
)
If I don't try and specify anything, and color by dimension using =Year(Date) then this is what the chart looks like.
I could use a little help. thanks.
I had this just about right... my problem was with taking a derivative of a field in the if statement.
I added Year(Date) as ydate to the load script and got this working correctly.
if(ydate='2015' ,blue(),
if(ydate='2016' ,'#f0e68c','#ff0000'))
Can you please provide soma part of your app, so then i will help you.
Or you just can see how i make that already in this topic How to color the monthly bar for each year diff color , for easy visulisation purpose. It must work same way.
I had this just about right... my problem was with taking a derivative of a field in the if statement.
I added Year(Date) as ydate to the load script and got this working correctly.
if(ydate='2015' ,blue(),
if(ydate='2016' ,'#f0e68c','#ff0000'))
Well good. Mark some post as helpful if you got yuor solution.