Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help on Data Modelling - Database of a "Questionnaire"

Hello fellows of the Forum. Great Forum this one !

We got a database here that very likely you may faced that before.

Wonder some questions & answer that we apply to people .

Here's a sample :

---------------

1) Which is your monthly income ?
A : Up to US $ 500.00
B : From US $ 500.01 to US$ 1,000.00
C : From US $ 1000.01 above
2) How many TV sets you have at home ?
A : None
B : One
C : Two
D : Three or more
3) How did you know about us ?
A : Magazine
B : Internet
C : TV Advertisement
4) Male/Female ?
A : Male
B : Female
5) Which products do want to know more about ?
A : Product X
B : Y Product Line
C : Z

---------------------

Some questions admit more than one answer , such as question 5.

I have prepared a tiny QVW, self-contained (inline data) that loads a sample file.

My question is : how can I improve those information presentation ?

I mean , would there be a better visual representation of the questions ? I'd like maybe to use CRLF inside the questions (and answers).

Best graphs ?

Thanks in advance !

2 Replies
Not applicable
Author

Hey Adrian,

I downloaded your application and had a bit of a play around. I have one suggestion.

If you want to present the breakdown of answers per question, it is difficult to do this with a text field (ANSWER).

You could assign a numeric value to the ANSWER field using the DUAL function which will then enable to you create a sum (using a relative calculation even).

This should enable to you graphically display the results of your questionnaire much better.

See below:

dual

dual( s , x )

Forced association of an arbitrary string representation s with a given number representation x. In QlikView, when several data items read into one field have different string representations but the same valid number representation, they will all share the first string representation encountered. The dual function is typically used early in the script, before other data is read into the field concerned, in order to create that first string representation, which will be shown in list boxes etc.

Example:

load dual ( string,numrep ) as DayOfWeek inline

[ string,numrep

Monday,0

Tuesday,1

Wednesday,2

Thursday,3

Friday,4

Saturday,5

Sunday,6 ];

load Date, weekday(Date) as DayOfWeek from afile.csv;

The script example will generate a field DayOfWeek with the weekdays written in clear text. QlikView will for all purposes regard the field as a numeric field.



Not applicable
Author

Thank you so much Mr Sweeney !

Well, I've prepared another version of my tiny demonstration QVW where I inserted a VERY important information : the DATE. Cause we wanna track customers profile along the time , of course !

I also inserted a Pivot Table where we can count the answers inside the hierarchical structure of the data.

So far, so good ... I dont know but things dont look so bad. The graph is a problem though !

As for your "load dual" suggestions, I'm sorry but I dont get your point.

On this new sample I've built some keys conccatenating fields wich seems to be a tournaround for the load dual. I dont know...

Would you be so kind to have a new look into it and point some other suggestions ?

Let's also listen to other fellows, of course !

Thanks !