
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to add color to a bar graph.
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
- Subscribe by Topic:
-
Client Managed
-
Deployment
-
Entitlements & Permissions
-
Management
-
Other
-
Publisher
-
SaaS
-
Security
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I can't read anything on that image, can you paste as text?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
=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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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))))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have implemented your code. But my 2021 and 2022 bars are not the required color.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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),

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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))))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the color I want.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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))))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- « Previous Replies
-
- 1
- 2
- Next Replies »