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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jujurier
Contributor II
Contributor II

Transform field values in fields

Hello, I need to transform a dataset and i'm stuck in the process.

Example:

ID     Brand     Rating      Status

1          A             4                 General

1          B             2                 General

1          C             3                 Detail

2          A             1                 General

3          B             3                 General

I would like to end up with this structure: Create fields according to different values of Brand(A, B, C, etc...), and populate these fields with the Rating value:

ID         Status             A             B             C

1          General          4              2           

1          Detail                                             3

2          General          1

3          General                          3

Any help would be appreciated, thank you.

1 Solution

Accepted Solutions
Saravanan_Desingh
MVP
MVP

Try this,

tab1:
Generic
LOAD ID, Status, Brand, Rating;
LOAD * INLINE [
    ID, Brand, Rating, Status
    1, A, 4, General
    1, B, 2, General
    1, C, 3, Detail
    2, A, 1, General
    3, B, 3, General
];

View solution in original post

3 Replies
rwunderlich
MVP
MVP

Saravanan_Desingh
MVP
MVP

Try this,

tab1:
Generic
LOAD ID, Status, Brand, Rating;
LOAD * INLINE [
    ID, Brand, Rating, Status
    1, A, 4, General
    1, B, 2, General
    1, C, 3, Detail
    2, A, 1, General
    3, B, 3, General
];
Saravanan_Desingh
MVP
MVP

Output:

commQV89.PNG