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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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

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
Partner Ambassador/MVP
Partner Ambassador/MVP

Saravanan_Desingh

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

Output:

commQV89.PNG