Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do i color a bar chart with my colors under the chart by expression?
This is my code , but it's not affecting the red and blue for 2023 and 2024
=if(year(Date) = 2023, RGB(255,0,0), // Red for 2022
if(Year(Date) = 2024, RGB(0,0,255))) // Blue for 2023.
The below is my bar chart , thanks
Try this:
=if(year(Max(Date)) = 2023, RGB(255,0,0), // Red for 2022
if(Year(Max(Date)) = 2024, RGB(0,0,255))) // Blue for 2023.
Works for me in this demo data I have:
Alternatively, you can always specify Year as master dimension and then set a color for each year:
Try this:
=if(year(Max(Date)) = 2023, RGB(255,0,0), // Red for 2022
if(Year(Max(Date)) = 2024, RGB(0,0,255))) // Blue for 2023.
Works for me in this demo data I have:
Alternatively, you can always specify Year as master dimension and then set a color for each year:
Thanks , the above has worked for me