Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Data manipulation and dynamic charts

Posted on 2012-04-01
6
Medium Priority
?
319 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 21

Author Comment

by:viki2000
ID: 37794713
Excel 2003
0
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 2000 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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 21

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 21

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 21

Author Comment

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

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

885 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