Solved

Data manipulation and dynamic charts

Posted on 2012-04-01
6
274 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

785 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