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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting in Pivot Table/Chart

I want to show employee salaries sorted in descending order in each month in chart.  Please see the attached QVW file.

I tried Aggr() and FirstSortedValue() but couldn't get it done, may be I wasn't using the right expressions.

This chart is dynamic and I don't know the exact salaries.  The ones that I mentioned are very simple like 10,20, etc so sorting salaries by a divisor won't work.  Also, as chart is dynamic I don't have the option of creating an INLINE table for salary ranking.

Any help will be appreciated.  Many thanks.

salary.JPG

5 Replies
Not applicable
Author

Kasim;

Check this.

best regards.

Not applicable
Author

Hi...

Is this what you were looking for??

Not applicable
Author

Thanks Claudio for your answer, but unfortunately we have got varying salaries in different months for same individuals.  For example, Jan-13 David 50, Feb-13 David, 40

Please load the table below and see

HR:

LOAD * INLINE [
Month-Year, Names, Salary
Jan-13, David, 50
Jan-13, John, 20
Jan-13, Rob, 30
Jan-13, Steve, 10
Feb-13, David, 40
Feb-13, John, 30
Feb-13, Rob, 30
Feb-13, Steve, 10
Feb-13, Phil, 200
Mar-13, David, 40
Mar-13, John, 20
Mar-13, Rob, 30
Mar-13, Steve, 10
Mar-13, Matt, 50
Apr-13, David, 40
Apr-13, John, 20
Apr-13, Rob, 30
Apr-13, Steve, 10
May-13, David, 40
May-13, John, 20
May-13, Rob, 30
May-13, Steve, 10
May-13, Phil, 100
Jun-13, David, 40
Jun-13, John, 20
Jun-13, Rob, 30
Jun-13, Steve, 10
]
;

saumyashah90
Specialist
Specialist

hope this helps you

Not applicable
Author

Thanks Saumya for your answer, but unfortunately we have got varying salaries in different months for same individuals.  For example, Jan-13 David 50, Feb-13 David, 40

Please see my reply to Claudio