Question

Create 1 bar chart from multiple questions

Asked by: mharcais

HI,

I have 8 questions I want to display the results of on one bar chart.

At the moment, when I run a frequencies query on all 8 questions, it creates a seperate bar chart for each.

I want the yes/no percentage for each question to appear in one chart... can this be done?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-08-18 at 03:28:00ID24660893
Topics

SPSS

,

Probability & Statistics

Participating Experts
1
Points
500
Comments
18

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Bar Chart
    I'm currently developing a bar chart in asp which results from the following query.... Set objRS = Server.CreateObject("ADODB.Recordset") Set objRS.ActiveConnection = objConn dtmFirst = CDate(strFirstMonth & " " & strFirstDay &", " ...
  2. create a bar chart
    hello, i have data in this format. ***** abc abc . . pqr pqr . . xyz xyz . . ***** ie columns with various different values. i need to construct a bar chart with abc, pqr, xyz, and so on, on x-axis and with their corresponding values on y-axis. ie. is there a way in excel...
  3. Bar Chart
    Hi, I want to generate a bar-chart in jsp using taglib based on percentage values? Thanks, Ramakrishna
  4. Create bar chart
    Can anybody provide me with an example of how to create a bar chart with the y axis set to 100% always, also I need to be able to add custom colours to the chart for each bar draw. The bar chart I am creating is a horizontal chart which varies in percentages retuurned from 0 ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: richdiesalPosted on 2009-08-19 at 11:13:36ID: 25135597

To the moderator: I have an SPSS alert, but it didn't go off until a couple of hours before your community alert did.

Now, to mharcais...

Yes, you can, but the output is not exactly what you'd think.  

For this explanation, I'm going to assume you used code 1=Yes and 0=No for 8 variables called yn1, yn2, yn3...yn8.  You'd need to adjust the procedure slightly depending on differences in your own dataset.

1) Go to Bar under the Graphs menu (might be under "Legacy Dialogs" depending on your version)
-- Bar Charts Dialog --
2) Select "Summaries of separate variables" at the bottom
3) Click on "Simple"
4) Click on "Define"
-- Define Simple Bar Dialog --
5) Put yn1 to yn8 in "Bars Represent"
6) While yn1 to yn8 are still highlighted under Bars Represent, click on "Change Statistic..."
-- Statistics Dialog --
7) Click on "Percentage Above"
8) Next to Value, type "0"
9) Click on "Continue"
-- Define Simple Bar Dialog (again) --
10) Click on "OK"
-- Output Pane --
11) This graph displays all of your variables, with the percentage "Yes" in each.
12) You will probably, at the bare minimum, want to change the y-axis label ("% > 1"), which you can do by double-clicking on the chart to open the Chart Editor, clicking once on the axis label, waiting a second, and then clicking on the label again.

I will add that if your values are currently text (e.g. if you actually have "Yes" and "No" in your dataset rather than numerical representations), you'll need to use the variable recode functions (under Transform) to turn them into numbers, otherwise SPSS will have no way to know that you specifically want to analyze "Yes" instead of "No."

 

by: richdiesalPosted on 2009-08-19 at 11:29:34ID: 25135740

Also, if all of that seems too confusing, you could use this syntax:

GRAPH
  /BAR(SIMPLE)=PGT(1)(yn1) PGT(1)(yn2) PGT(1)(yn3) PGT(1)(yn4) PGT(1)(yn5) PGT(1)(yn6) PGT(1)(yn7) PGT(1)(yn8)
  /MISSING=LISTWISE.

Just change out "yn1" to "yn8" for your variables names, and this should work just as well (still assuming you defined 0=No and 1=Yes).

 

by: mharcaisPosted on 2009-08-19 at 12:34:31ID: 25136420

HI - when I try to add a variable to the "Bars Represent", I get an error saying that "String variables are not allowed in the list".

The 8 variables have three values 1 = "Yes", 2 = "No", 3 = "No Answer"

The questions themselves are, for example "Do you accept payments online".
The variable name for this one, for example is "DonationMechanismOnline"
The Label is "Do you accept donations online?"

 

by: richdiesalPosted on 2009-08-19 at 12:59:57ID: 25136712

See this section:
"I will add that if your values are currently text (e.g. if you actually have "Yes" and "No" in your dataset rather than numerical representations), you'll need to use the variable recode functions (under Transform) to turn them into numbers, otherwise SPSS will have no way to know that you specifically want to analyze "Yes" instead of "No."

If you already recoded your strings into numbers (i.e. if 1 2 and 3 are the values in your dataset), you'll need to go to variable view and change the variable type to "Numeric" instead of "String",

 

by: mharcaisPosted on 2009-08-19 at 14:41:02ID: 25137663

HI - I have spent 20 minutes on recoding the variables without any luck, and I'm afraid those steps themselves need a walkthrough....
 

 

by: richdiesalPosted on 2009-08-19 at 19:05:45ID: 25138891

Well you said:
"The 8 variables have three values 1 = "Yes", 2 = "No", 3 = "No Answer""

So I assume that means when you look at your dataset, you see 1's 2s and 3's in the columns you're interested in?

 

by: mharcaisPosted on 2009-08-20 at 02:04:21ID: 25140425

No, I see the words ratehr than the numeric values. If I click into the values to adjust them, the numberic value appears, but it's not a selectable item...

 

by: richdiesalPosted on 2009-08-20 at 07:47:06ID: 25143184

Ah.  There's a setting to show Value Labels in the dataset, which it looks like you have turned on.  But that probably means that you have actual numbers in your dataset (hopefully).

When you click on Variable view at the bottom (it's a tab), you should see a list of all of the variables in your dataset along with a lot of other information related to each.  Under "Type" you should see the word "String" next to the variables that you are interested in using.  Click one of the cells that says String and click on the triple dot button that appears in the cell (it looks like this: "...").  Select Numeric in the resulting list.

One of two things will happen.  Either 1) your data will look the same in the dataset viewer (which is what we want) or 2) it was all get deleted.  If it gets deleted, close the file without saving, and let me know.  If it doesn't, the graphing procedure I described above should work.

 

by: mharcaisPosted on 2009-08-20 at 13:01:38ID: 25146496

HI - all the values are now as numbers in the data viewer...however in the values column, it has "None" for each...

And when I run the chart (as first reply above) , every one of the 8 questions is listed as 100%....

 

by: richdiesalPosted on 2009-08-20 at 13:34:36ID: 25146873

In the data viewer, you shouldn't be able to see the values column...  you should only be able to see that in the variable viewer.

Tell you what - I think a lot of this confusion is just due to miscommunication, so it might be easier (and faster) if you were just to post the file and I will take a look at the SAV itself.  If your data is sensitive, feel free to delete all but a couple of lines of data or any identifying columns - just make sure not to change anything about the columns containing the 8 pieces of data you're interested in themselves.

 

by: mharcaisPosted on 2009-08-22 at 08:42:43ID: 25159062

no, i was referring to the values column in variable view, not data view.

I'm afraid the data is confidential, so I won't be able to post even parts of it, or I will break ethics guidelines I've signed...

 

by: richdiesalPosted on 2009-08-22 at 10:51:32ID: 25159572

Ah, sorry, "all the values are now as numbers in the data viewer...however in the values column" confused me.

Well... that will just make this a little more tricky.  :)

Here's the approach then - first, delete all entries in the Values column for all variables and then tell me if you see numbers or words in the data view.  Then run a FREQUENCIES analysis on each of the variables and tell me what appears in the first column of that analysis (should be either numbers or words).

You will probably want to do this on a copy of your original dataset so that you don't accidentally delete and save.

 

by: mharcaisPosted on 2009-08-22 at 11:17:27ID: 25159659

HI richdiesal, the frequencies analysis brings up words, not numbers...

 

by: richdiesalPosted on 2009-08-22 at 13:05:25ID: 25160024

What are the words?

 

by: mharcaisPosted on 2009-08-22 at 14:17:44ID: 25160299

Valid      Yes
               No
               Total

 

by: richdiesalPosted on 2009-08-22 at 20:18:22ID: 25161226

Ah!  Then that's pretty easy (perhaps surprisingly!).  You do indeed need to convert everything over to a numeric format.  To do so:

1) Click "Recode into Same Variables" under the "Transform" menu.
-- Recode into Same Variables dialog --
2) Put all of the variables you'd like in the bar graph into the right-hand list
3) Click "Old and New Values"
-- Recode into Same Variables: Old and New Values dialog --
4) Under the "Old Value" section, put "Yes" in the blank next to Value:
5) Under the "New Value" section, put "1" in the bank next to Value:
6) Click Add
7) Under the "Old Value" section, put "No" in the blank next to Value:
8) Under the "New Value" section, put "0" in the bank next to Value:
9) Click Add
10) Click Continue
-- Recode into Same Variables dialog --
11) Click OK
12) Open the Variable pane using the tabs at the bottom
-- Variable pane --
13) Next to the first variable that you are interested in generating the graph for, click on the box under "Type" (it probably says String)
14) Click the triple dots that appear
-- Variable Type dialog --
15) Click on Numeric
16) Click OK
-- Variable pane --
17) Click on the box that just changed to Numeric (so that it is highlighted) and press Ctrl-C (to copy)
18) Click on the Type entry for the second variable you are interested in
19) Press Ctrl-V (to paste)
20) Repeat steps 18-19 for each variable you want to generate the graph for
21) Click on the box under Values for the first variable you are interested in
22) Click on the triple dots that appear
-- Value Labels dialog --
23) Enter "0" for Value and "No" for Label
24) Click Add
25) Enter "1" for Value and "Yes" for Label
26) Click Add
27) Click OK
-- Variable view --
28) Click to highlight the box under Values that just changed and press Ctrl-C (to copy)
29) Click on the Values entry for the second variable you are interested in
30) Press Ctrl-V (to paste)
31) Repeat steps 29-30 for each variable you want to generate the graph for
32) See my post above (ID: 25135597) for directions on how to generate the graph using your newly converted data

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...