473,659 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Want my pie chart to show values and percentages also

2 New Member
I am using Access 2003. I made a pie chart from a query for the sum in each catagory i am using. I want the chart to show the sum and also the percentage of the total.
Apr 20 '07 #1
3 7124
nico5038
3,080 Recognized Expert Specialist
The best approach is to add the calculations to a query and base your chart on that query.
Using a UNION will allow different rows like:

select ID, "Year " & Year(DateField) as YearOfDate, ValueField from table
UNION
select ID, "Total", Sum(Valuefield) from table GroupBy ID;

Getting the idea ?

Nic;o)
Apr 23 '07 #2
HBH
2 New Member
The best approach is to add the calculations to a query and base your chart on that query.
Using a UNION will allow different rows like:

select ID, "Year " & Year(DateField) as YearOfDate, ValueField from table
UNION
select ID, "Total", Sum(Valuefield) from table GroupBy ID;

Getting the idea ?

Nic;o)
Thank you for your time and the idea. I couldn't get the UNION to work right, But it gave me an idea to do it another way.
I made one query to sum the total of the numbers, a second query to use that total to calculate the percent and grouped by type, and a third query that just listed the results of the second query but also had an expersion that joined the type with the percent so it would show in the legend of the pie chart.
I tried putting the querys together but the grouping and the math worked against each other and wouldn't give the right numbers or would group by too many different things and never sum up.
I think I did something easy a very hard way.
Apr 26 '07 #3
nico5038
3,080 Recognized Expert Specialist
The basics for a UNION are the fact that the number and the datatype of the columns from the select are equal.
To roll-up the data you can use a literal to replace a value for grouping records.
Thus:

select ID, Name, Amount from tblA
UNION
select ID, "Total", Sum(Amount) from tblA

Will give a totalline for each ID.

Nic;o)
Apr 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
12520
by: Brian Shade | last post by:
Hi all. I am having a bit of a problem with my Perl script and the creation of a chart. I can create the chart and create a new SeriesCollection. I then specify the XValues and the Values parameter of the first SeriesCollection object. I add another SeriesCollection, but I am only able to set the XValues and I get the following error when I try to set the Values parameter: OLE exception from "Microsoft Office Excel": Unable to set the...
2
2530
by: farrell77 | last post by:
I have a pivot chart that displays 3 data series. Series 1 values range from 17 to 106. Series 2 values range from 1 to 18. Series 3 values range from 0 to 1. When I display all three series on the chart, the value axis labels run from 1 to 120 with major unit lines at intervals of 20. When I remove Series 1, the chart automatically adjusts itself and the
5
7522
by: Thierry Lam | last post by:
Let's say I have the following data: 500 objects: -100 are red -300 are blue -the rest are green Is there some python package which can represen the above information in a pie chart?
2
2793
by: Homer | last post by:
Hi, Have a quick question: Lets say I have a Hashtable of values hence 56 37.890 1 12.768 5 9.764 etc.... Is there a way for me to draw a chart in C# of this. FYI its actually lottery numbers and the percentages of how often they have repeated. I fugured this would be a good
1
2430
by: Rob | last post by:
Hello; I searched and could not find a solution. DOes anyone know how you can actually have the Chart Legend reflect your report/table? I am using a simple two column table like this to test out graphing abilities of the cr graphs year sale 1993 50
1
3829
by: Scott H. | last post by:
Hello: I am trying to use Crystal Reports from VS.NET 2003 to produce a simple line chart, where the x axis represents the number of measurements taken and the y axis represents the range of measurement values. There are two sets of points or measurements, so I would like a line on the chart for each set of values (two lines). I can produce the line chart on a VB.NET form correctly using an Infragistics UltraChart obeject. The data...
18
8743
by: Marcel Saucier | last post by:
Hello, I want to use the above characters codes chart but I dont know how to set the typeface (documentation: The characters that appear in Windows above 127 depend on the selected typeface). For example, when I print the chr(205), I am not getting the one shown in the Chart 2 list... A step by step approach will be appreciated (in a windows form application). --
5
2087
by: BerkshireGuy | last post by:
I have two functions that calculate two numbers based on based in parameters. So, the functions return a value. Is there a way to create a chart based on values from a function? The only other thing I can think of is have a make table query call the fuctions and then base the chart from that? Thanks Brian
0
51115
debasisdas
by: debasisdas | last post by:
Here's a simple VB6 code snippet that uses the MSChart control to display Charts in VB6.0. To use this sample, please following steps Create a new project in VB6 Pull down the Project menu and choose Components . Select the checkbox next to Microsoft ChartControl 6.0(OLEDB), Click OK. Add a combobox,one Mschart control and one check box tothe existing form. Paste in the following code tothe code window Private Sub Form_Load() 'Fill the...
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.