X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Bar Graph With Conditional Colors, Access 2010    
post Nov 8 2019, 04:25 PM

Posts: 660
Joined: 18-October 05
From: Roselle, Illinois

Happy Friday!

I have an Access Report that shows weeks and the number of completions by week. I want to make a graph (bar chart) that shows a yellow bar if the week number is 2 (2nd week of month) and percent complete is less than 30% and green if it's greater than 30%. For the week 3 bar graph, I would like it to display a yellow bar if the percentage is less than 70, and green if it's greater than 70. Weeks 1 and 4 would display another color. The source looks something like this:

AvgHistory AvgHistoryCompletions CurrMthCompletions MthTotal MyPerc Week2Status Week3Status
1 10.70 12 228.22 5.26%
2 50.30 34 228.22 14.90% Yellow
3 47.10 21 228.22 9.20% Yellow
4 77.30 44 228.22 19.28%
5 50.00 32 228.22 14.02%

Does anyone know if this can be done?

The artist is nothing without the gift, but the gift is nothing without the work.
Go to the top of the page
post Nov 9 2019, 09:44 PM

Posts: 20,531
Joined: 10-January 04

hi Sorbit,

Will something like this work for you?
It uses conditional formatting for the colors and the bars were made using
   BarGraph: String([MyPerc]*100,ChrW(9608))

The first image uses the numbers in your example. The second image shows results from conditional formatting for 2 when the number is changed to more than 30%.

This post has been edited by strive4peace: Nov 9 2019, 09:57 PM
Attached File(s)
Attached File  barGraph_conditionalFormatting.png ( 7.4K )Number of downloads: 3
Attached File  barGraph_conditionalFormatting_green_s4p.png ( 7.29K )Number of downloads: 1

have an awesome day,

Microsoft MVP
Remote Training and Programming -- let's connect and build your application together! MsAccessGurus.com
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    31st May 2020 - 03:02 PM