Solved

Data manipulation and dynamic charts

Posted on 2012-04-01
6
257 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

743 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

11 Experts available now in Live!

Get 1:1 Help Now