Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to add color to the bar graph by entering the Expression background color.
The conditions are If the bar graph shows data for the year, include rgb(30,144,255) and if the graph shows data for the month, enter Rgb(70,130,180) and if the graph shows data for the day, enter rgb(135,206,250)
This is the code that displays the data in a bar graph.
please help me
Hi, I can't read anything on that image, can you paste as text?
=if(KCE_MonthYear>=Date(AddMonths(Today(0)-1,-1),'YYYY-MM-01'),date(KCE_Date,'MM/dd/YY'), >> Day
if(KCE_Year>Year(Today(0)-1)-1,date(KCE_MonthYear,'$(vMonthYearFormat)'), >> Month Today
if(KCE_Year>Year(Today(0)-1)-3,KCE_Year))) >> Year 2022 2021
Hi, if I understood it well I think you can use the same expressión but setting the color code:
=if(KCE_MonthYear>=Date(AddMonths(Today(0)-1,-1),'YYYY-MM-01'),RGB(136,206,250),
if(KCE_Year>Year(Today(0)-1)-1,RGB(70,130,180),
if(KCE_Year>Year(Today(0)-1)-3,RGB(30,144,255))))
I have implemented your code. But my 2021 and 2022 bars are not the required color.
Yes, I didn't check the expression, remove the -1, or use >= instead of >)
if(KCE_Year>Year(Today(0)-1),RGB(70,130,180),
if(KCE_Year>=Year(Today(0)-1)-1,RGB(70,130,180),
Thank you for helping me. But when I edit the code like yours My color on the month bar still hasn't changed.
if(KCE_MonthYear>=Date(AddMonths(Today(0)-1,-1),'YYYY-MM-01'),RGB(136,206,250),
if(KCE_Year=Year(Today(0)-1)-3,RGB(30,144,255),
if(KCE_Year=Year(Today(0)-1)-1,RGB(70,130,180))))
This is the color I want.
Hi, it hosuld be >= or remove the -1, and without changing the order inside the if:
=if(KCE_MonthYear>=Date(AddMonths(Today(0)-1,-1),'YYYY-MM-01'),RGB(136,206,250),
if(KCE_Year>=Year(Today(0)-1)-1,RGB(70,130,180),
if(KCE_Year>=Year(Today(0)-1)-3,RGB(30,144,255))))
I tried adding your code to expressions, but the colors didn't turn out the way I wanted. It will appear only when I click on the month chart. What should I do?
This is where I put your code
And when I click to select the month The bar graph shows the colors I want.