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: 
jozeph
Contributor
Contributor

Pivot several columns to row

 

Hello.

 

I have a file with this schema:

 

Name          Desc                    Year      Type       Client
Project A     Project A Desc     2011     IT            Client Z
Project B     Project B Desc     2012     Non IT    Client X
Project C     Project C Desc     2013     IT           Client Z
Project D     Project D Desc     2014     IT           Client X

 

I want to get values in a schema like this:

Pivot Name      Pivot Value     Name          Desc                    Year
Type                  IT                     Project A     Project A Desc     2011
Type                  Non IT             Project B     Project B Desc     2012     
Type                  IT                     Project C     Project C Desc    2013
Type                  IT                     Project D     Project D Desc    2014

Client                Client Z            Project A     Project A Desc     2011

Client                Client X            Project B     Project B Desc     2012     
Client                Client Z            Project C     Project C Desc    2013     
Client                Client X            Project D     Project D Desc    2014

 

So according to the schema above, i want to pivot based on type and client colums. How can I do this?

 

Thanks in Advance.

Kind Regards.

Labels (8)
2 Replies
TRF
Champion II
Champion II

1 tMap with 2 output dedicated (type/client) flows each connected to a tHashOutput (append mode + linked).
OnSubJobOk you should have all the desired rows accessible using a tHashInput.
If tHashInput doesn't contain all rows, use 2 different (unassociated) tHashOutput then OnSubJobOk, 2 tHashInput each associated to the corresponding tHashOutput and connected to a tUnit.
Should work.
TRF
Champion II
Champion II

Thanks for Kudo.
Don't forget to mark your case as solved if this answer help you to find a solution.