Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please help me out to pivoting the data.
I have a QVD file like below
And the qliksense script is like this
FORM_DASS21:
LEFT KEEP(FORM_DATA)
LOAD
FORM_ID,
"Anxiety score",
"Depression Score",
"I felt that life wasn't worthwhile",
"I found it hard to wind down",
"I was aware of dryness",
"I was aware of the action of my heart",
"I was intolerant of anything",
"I was unable to become enthusiastic",
"I was using a lot of nervous energy",
"I was worried about situations",
"Stress score",
"DASS 21 - Text",
"I felt that I was rather touchy",
"I couldn't seem to experience",
"I experienced breathing difficulty",
"I experienced trembling",
"I felt down - hearted and blue",
"I felt I was close to panic",
"I felt I wasn't worth much as a person",
"I felt scared without any good reason",
"I found it dif to work up the initiative",
"I found it difficult to relax",
"I found myself getting agitated",
"I had nothing to look forward to",
"I tended to over-react to situations"
FROM [lib://QVD/DASS.QVD]
(qvd);
Please anyone help with the script that will help to pivoting the data.
Thanks
Take a look at CROSSTABLE().
CROSSTABLE (Question, Answer,1)
LOAD
FORM_ID,
"Anxiety score",
"Depression Score",
"I felt that life wasn't worthwhile",
"I found it hard to wind down",
"I was aware of dryness",
"I was aware of the action of my heart",
"I was intolerant of anything",
"I was unable to become enthusiastic",
"I was using a lot of nervous energy",
"I was worried about situations",
"Stress score",
"DASS 21 - Text",
"I felt that I was rather touchy",
"I couldn't seem to experience",
"I experienced breathing difficulty",
"I experienced trembling",
"I felt down - hearted and blue",
"I felt I was close to panic",
"I felt I wasn't worth much as a person",
"I felt scared without any good reason",
"I found it dif to work up the initiative",
"I found it difficult to relax",
"I found myself getting agitated",
"I had nothing to look forward to",
"I tended to over-react to situations"
FROM [lib://QVD/DASS.QVD]
(qvd);
Hi Vegar ,
The data is like below -
after your CROSSTABLE() script
the data became like below -
1. Do you have any idea how to pivoting(row to column) is like how we have in the DASS form ?
2. Does it will work with Generic Load ? Will you help me with the Generic Load script ?
Thanks