Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to analyse a field with multiple choice data ??

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a field from a multiple choice questionnaire and cannot get correct analysis.
The data looks like:-
a,b,d
a,c
b,c,d
c
c,d
d,e
with many repeats and variations of course.
I want to know how many have chosen "a" or "d" etc, but not combinations.
- a simple count analysis returns the number conforming to each PATTERN.
- I tried creating an INSTRING variable but it only worked for the first letter in the field.
Any help most welcome!
+ should this be tackled at universe design level ?? .... Roger
 
Hello Roger,

Try to create univers objects that are substrings from the original field , making sure you leave out substrings that deliver you the comma's.
something like:
substr(0,1)
substr(2,1)

etc.
T. Blom
Information analist
Shimano Europe
tbl@shimano-eu.com
 
If you are using ORACLE you could try to create an object in the universe for each result by using INSTR (to search for the character position) and DECODE to return a 1 if it exists and 0 if not.

e.g. For a
decode(instr(RESULT,'a'),0,0,1)

If you don't want to create a universe object then create a new variable in the report for each result

e.g
=If Match(<RESULT> ,&quot;*a*&quot;) Then 1 Else 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top