Make a calculated field to determine the color and drag it to "color".
Something like this:
IF ATTR([Year]) = 2015 THEN 'grey'
ELSEIF ATTR([Year]) = 2016 AND SUM([Profit]) > 0 THEN 'green'
ELSEIF ATTR([Year]) = 2016 AND SUM([Profit]) <= 0 THEN 'red'
ELSE 'light grey'
Thank you for your reply Derrick. My Year measure however is written FY 2015 and contains 4 quarters so would it need to be like
IF INT([Year, Qtr of Date]) = 2015 THEN 'gray'
The else being q1 and q2 of 2016**
*my dimension is written FY 2015 Q1, FY 2015 Q2, FY 2015 Q3, FY 2015 Q4, etc.
Sure; whatever it takes to get the year out of your particular dimension should work. You could do a combination of LEFT/RIGHT too if INT gives you any issues.
Not sure why it's not working, can it not identify FY 2015 Q1,2,3,4 etc. if I just say IF INT([Year, Qtr of Date]) = 2015. Should I do something like IF ([Year, Qtr of Date]) = 'FY 2015'?
You'd have to try it out to see what INT() typecasts "FY 2015 Q1" to, but my guess is something like 20151 instead of 2015.
If your string looks exactly like "FY 2015 Q1", then you should be able to do this to get the year: INT(RIGHT(LEFT([Year], 7), 4))
Okay thank you for your help.