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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
somersst
Contributor III
Contributor III

Order of columns of Pivot result

Say I have the following table

0683p000009M0Vg.png

 

Using the Pivot-functionality I should receive the following result.

 

0683p000009M0Vl.png

 

But the result of the columbs is not always in the right order (1,2,3,4)

 

What is the logic that the Pivot-component used to determine this order, and how can I set it.

I already tried to sort on status, but this doesn't work for the order of columns

Labels (1)
  • v7.x

2 Replies
cterenzi
Specialist
Specialist

I would guess it is based on the order that the keys are encountered. Have you tried sorting the data before pivoting?
somersst
Contributor III
Contributor III
Author

I discovered the problem. The fact was that I did the sorting before the aggregate component, which made the sorting break again

Sort->Aggregate->Pivot : WRONG

Aggregate->Sort->Pivot : OK