# Problem with SPSS Chart builder

#### BOAZ

##### New Member
Hi there, I am trying to create a chart showing the results for a feedback questionnaire, preferably using a box plot, but also want to experiment with a simple dot plot or bar graph. I have responses form eight participants. There were 10 questions and each required the participant to a give a ranking of perceived benefits on the same scale:

0 = None
1 = Unsure
2 = Marginally
3 = Noticeably
4 = Very much so

I want to display the median, spread etc for each question on the one chart, i.e. each box plot represents one of the questions (variables). However, I am unable to drag more than one variable onto any axis. Here is a screenshot showing the layout of my data and my attempt at dragging the variables over:

I suspect my data is not laid out properly, but I can't see what the problem is as this layout was fine for data analyses (each row represents one participant, measures set to ordinal), and I was able to build similar error bar and bar charts with the scale measure data for the same participants. However, box plots did not work for the scale measure data when I tried to include more than one variable.

Last edited:

#### helicon

##### Member
There are two ways to achieve this. First, you can use the legacy graph options and select the 'Summaries of separate variables' option to produce your chart. An example of the syntax produced is:

Code:
EXAMINE VARIABLES=v1 to v10
/COMPARE VARIABLE
/PLOT=BOXPLOT
/STATISTICS=NONE
/NOTOTAL
/MISSING=LISTWISE.
If you want to use the more powerful chart builder, your second option is to restructure your data using the VARSTOCASES function. If you use the following syntax, swap out 'v1' and 'v10' for the first and last of the ten variables in your file (also can be found in the GUI under Data -> Restructure).

Code:
VARSTOCASES
/ID=id
/MAKE trans1 FROM v1 to v10
/INDEX=Index1(10)
/KEEP=
/NULL=KEEP.

#### BOAZ

##### New Member
Thanks for your help Helicon. It was really useful but I forgot to thank you at the time.