Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have table like below
subject_access_id | interactivity_type_id | value | interactivity_type |
---|---|---|---|
1234 | 1 | sent | sent? |
1234 | 2 | mailed | mailed? |
1234 | 3 | true | status? |
1235 | 1 | not sent | sent? |
1235 | 2 | mailed | mailed? |
1235 | 3 | false | status? |
1236 | 1 | sent | sent? |
i want to display like below
subject_access_id | sent? | mailed? | status? |
---|---|---|---|
1234 | sent | mailed | true |
1235 | not sent | mailed | false |
1236 | sent |
how could i do this?
load subject_access_id, interactivity_type_id ,value, interactivity_type;
SQL SELECT `subject_access_id`,
`interactivity_type_id`,
value,
interactivity_type
FROM INTERACTIVITYDATA ;
Hi sunny,
thanks it works!
one more question regarding this. If i don't have 'interactivity_type_id',
Table:
LOAD * INLINE [
subject_access_id, value, interactivity_type
1234, sent, sent?
1234, mailed, mailed?
1234, true, status?
1235, not sent, sent?
1235, mailed, mailed?
1235, false, status?
1236, sent, sent?
];
At this time should i still use for loop to get the required output? if so how.
You can do this
Table:
LOAD * INLINE [
subject_access_id, value, interactivity_type
1234, sent, sent?
1234, mailed, mailed?
1234, true, status?
1235, not sent, sent?
1235, mailed, mailed?
1235, false, status?
1236, sent, sent?
];
FinalTable:
LOAD DISTINCT subject_access_id
Resident Table;
FOR i = 1 to FieldValueCount('interactivity_type')
LET vField = FieldValue('interactivity_type', $(i));
Left Join (FinalTable)
LOAD DISTINCT subject_access_id,
value as [$(vField)]
Resident Table
Where interactivity_type = '$(vField)';
NEXT
DROP Table Table;
Hi,
I have a week column where there are values like week2,week2.... So how to convert these field values into columns in qliksense straight table.
Hi Sunny,
I have a field name week with values week1,week2,week3...week5 and how to convert these values to columns in qliksense straight table?