I want the cell the sparkline is in to visually represent the fiscal year 7/1/2020-6/30/2021 and to show a bar within it that demonstrates when during that year a project will begin and end. So, say the project starts on 1/1/2021 and runs through 6/30/2021, the bar would fill in the right half of the cell.
(The bar will be colored to represent whether or not the project is on track, but I have that part figured out).
Where I'm running into trouble is when a project started prior to this fiscal year, or runs beyond it. In those cases, I just want the bar to be solid across the full cell, to show that the project will be going on all year long.
Here's roughly what I'm looking at: '=SPARKLINE({INT(projectStart)-INT(fiscalYearStart), INT(projectFinish)-INT(fiscalYearFinish)},{"charttype","bar";"color1".....; "max",INT(fiscalYearFinish)-INT(fiscalYearStart)})
Say a project began back in January 2020, the bar isn't starting at the left of the cell - it's starting a bit farther to the right, which I don't like. I'd like to pretend it started on 7/1/2020 for visualization purposes.
I am tracking a long list of projects across the fiscal year, so it will be apparent if some of them display incorrectly.
I've taken the liberty of putting the FY start/end dates into cells
L7
, andM7
respectively.Your problem can be solved with three colors/segments in the bar: