Formula error
I am having trouble creating a field that can be added to the series section of a pie chart. The pie chart needs to show how a color associated with each condition to be able to split the pie chart in the sections. My formula keeps saying expecting boolean and I am not sure why. I have included a 1 at the end of each condition and a 0 at the end. Can some one help with getting the formula to work please?
Here is the code:
if(
[Days Open] <= 30, [(HIPO) / (HVL)] = "HIPO", "#2ca01c", 1, // show green if the event is HIPO and days open is 30 days or less
[Days Open] <= 31, [ (HIPO) / (HVL)] = "HIPO", "#ad0707", 1, // show dark red if the event is HIPO and days open is 31 days or more
[Days Open] >= 60, [(HIPO) / (HVL)] = "HVL", "#2ca01c", 1, // show green if the event is HVL and days open is 60 days or less
[Days Open] <= 61, [(HIPO) / HVL (HVL)] = "HVL", "#ff0808", 1, // show red if the event is HVL and has been open 61 doays or more
// conditions above apply to closed events
[Days Open] <= 0, [Days Open] >= 21, [(HIPO) / (HVL)] = "HIPO", "#0089cd", 1, // show blue if the event is HIPO and between 0-21 days
[Days Open] <= 22, [Days Open] >= 30, [(HIPO) / (HVL)] = "HIPO", "#fff700", 1, // show yellow if the event is HIPO and between 22-30 days
[Days Open] <= 31, [(HIPO) / (HVL)] = "HIPO", "#ff0808", 1, // show red if the event is HIPO and has been open for 31 days or more
[Days Open] <= 0, [Days Open] >= 52, [(HIPO) / (HVL)] = "HVL", "#0089cd", 1, // show blue if the event is HIPO and between 0-52 days
[Days Open] <= 0, [Days Open] >= 21, [ (HIPO) / (HVL)] = "HIPO", "#fff700", 1, // show yellow if the event is HIPO and between 53-60 days
[Days Open] <= 0, [Days Open] >= 21, [(HIPO) / (HVL)] = "HIPO", "#2ca01c", 1, // show green if the event is HIPO and has been open for 61 days or more
// conditions above apply to open events
,0)
------------------------------
Tonya Jacques
------------------------------