Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an if statement that works perfectly for row background colors, but when I try to use it in my color expression for the background of a pie chart, it always falls through to the default (in this case the default is Lightcyan(40))
I am not sure what could be causing it to fall through the if statement on the pie chart when it works as intended on the row background color for the table. Any suggestions? (This is my first time messing with custom chart colors).
=If(not isnull([SA M Revised Date]) and (Date([SA M Revised Date]) < Today() and isnull([SA M Completed Date])), LightRed(120), //late
If((isnull([SA M Revised Date]) and not isnull([SA M Initial Date])) and (Date([SA M Initial Date]) < Today() and isnull([SA M Completed Date])), LightRed(120), //late
If(not isnull([SA M Revised Date]) and (Date([SA M Revised Date]) < Today() and Date([SA M Completed Date]) > Date([SA M Revised Date])), LightGreen(40), //Completed Late
If((isnull([SA M Revised Date]) and not isnull([SA M Initial Date])) and (Date([SA M Initial Date]) < Today() and isnull([SA M Completed Date])), LightGreen(40), //Completed Late
If((isnull([SA M Revised Date]) and not isnull([SA M Initial Date])) and (Date([SA M Initial Date]) < Today() and Date([SA M Completed Date]) > Date([SA M Initial Date])), LightGreen(40),//Completed Late
//If(isnull([SA M Initial Date]), Yellow(120), //Missing
If(not isnull([SA M Completed Date]), Green(100), //Completed on time or early
If(not isnull([SA M Initial Date]) and isnull([SA M Revised Date]) and Date([SA M Initial Date]) < (Today() + 14) , Yellow(80), //within 14 days
If(not isnull([SA M Revised Date]) and Date([SA M Revised Date]) < (Today() + 14) , Yellow(80), //within 14 days
If((not isnull([SA M Revised Date]) or not isnull([SA M Initial Date])) and (Date([SA M Revised Date]) or Date([SA M Initial Date])) > Today(), LightBlue(120),
Lightcyan(40) //default
)))))))))
I have tried changing the pie chart to color by dimension and it pulled over my dimension information. I updated the color scheme as seen below and it still does not color each piece of the pie chart to the color I am specifying.
The table rows are color coded as appropriate but I cannot figure out how to code the pie chart to match.
=If((not isnull([SA M Revised Date])) and (Date([SA M Revised Date])) >= Today()
and isnull([SA M Completed Date])
and
TimeStamp([SA M Revised Date]) >= today()
and
Timestamp([SA M Revised Date]) <= Today()+ $($(vMFilter))
, LightBlue(120),
If((not isnull([SA M Initial Date]) and isnull([SA M Revised Date])) and (Date([SA M Initial Date])) >= Today()
and isnull([SA M Completed Date])
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and
TimeStamp([SA M Initial Date]) >= today()
and
Timestamp([SA M Initial Date]) <= Today() + $($(vMFilter))
, LightBlue(120),
If(not isnull([SA M Revised Date]) and (Date([SA M Revised Date]) < Today()
and isnull([SA M Completed Date])
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and $($(vMFilter)) = 7200
)
, LightRed(120),
If(not isnull([SA M Revised Date]) and (Date([SA M Revised Date]) < Today()
and not isnull([SA M Completed Date]) and Date([SA M Completed Date] > Date([SA M Revised Date]))
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and $($(vMFilter)) = 7200
)
, LightGreen(40),
If((isnull([SA M Revised Date]) and not isnull([SA M Initial Date]))
and (Date([SA M Initial Date]) < Today() and isnull([SA M Completed Date])
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and $($(vMFilter)) = 7200
)
, LightRed(120),
If((isnull([SA M Revised Date]) and not isnull([SA M Initial Date]))
and (Date([SA M Initial Date]) < Today() and Date([SA M Completed Date]) > Date([SA M Initial Date])
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and $($(vMFilter)) = 7200
)
, LightGreen(40),
//If(isnull([SA M Initial Date]), 'Missing',
If(not isnull([SA M Completed Date])
and $($(vMFilter)) = 7200
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold)), Green(100))))))))