Solved

Data manipulation and dynamic charts

Posted on 2012-04-01
6
267 Views
Last Modified: 2012-04-02
Given the attached excel file:
1) I need to see in a new sheet:
a) Similar items from column 2 grouped together in tables (one under each other separated with an empty row) and each table to show the total from their column 3.
b) A table with statistics: how many times (%) the each item type from column 2 is present.
2) I need to see in charts:
a) A chart with vertical bars. Each bar should show the total value from column 3 “Nr.” related with all similar items from column 2 “Reason”. For example “PP” from “Reason” appears many times but I want only one bar which has the height equal with sum from columns 3 “Nr” for all “PP”. In top of the bar I need to see that total value.
Under that bar I need to see with different colors each “PP” values.
The Ox axes should be the number of non-repeatable items from column 2 “Reasons”.
b) A pie chart to show only the totals from the chart with vertical bars.
c) A pie chart to show the statistics from 1) b).

You may apply filters, data validation, pivot table or VBA code.
Important: the data present in the attached excel file will not be the same for my real application (here is just an example) and I need to “automate” the data extraction, filtering, charting. The length of the initial list (number of rows) and the number of columns may vary.
Data-filter-and-Dynamic-chart.xls
0
Comment
Question by:viki2000
  • 4
  • 2
6 Comments
 
LVL 17

Expert Comment

by:andrewssd3
ID: 37794609
With the data you have posted, most of what you ask is possible with one pivot table and some pivot charts.  However, 2a) can't show the divisions of the bars meaningfully as some of the values are negative and you would get strange results.  For the same reason, 2b) would not work either, as some of the totals are negative.

What version of Excel do you have?
0
 
LVL 20

Author Comment

by:viki2000
ID: 37794713
Excel 2003
0
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 500 total points
ID: 37795315
Hi - here is your workbook with the column chart and pie chart added.  I can only do the column chart for the totals, and the pie chart for the proportion of total volumns.  As I said, the negative values make it difficult to display the other things you asked for.

This uses pivot tables, which is the best method I think given your data.  When the data changes you can just refresh the tables to reflect the new data.

Let me know if you have any questions about this.

Data-filter-and-Dynamic-chart.xls
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 20

Author Comment

by:viki2000
ID: 37795674
When I make changes in the Sheet "Data filter" how do I "refresh the tables to reflect the new data"?
0
 
LVL 20

Author Comment

by:viki2000
ID: 37795782
OK, i found how to refresh.
Not too bad.
You just taught me to use pivot table. I never needed before.
I had in mind a more complicated solution for which I had no time: to write some VBA code and with a push of the button to do next:
- scan the sheet "Data filter" row by row.
- copy each new row in a new sheet and make tables with similar items - an let a empty row between them.
- make the sum for each table.
- create the charts attached to the tables and the sum.

But for the moment I see your solution faster and good enough.
I check few more things then I come back to my final impression.
0
 
LVL 20

Author Comment

by:viki2000
ID: 37795834
OK, good enough.
Thank you.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now