Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator II
Creator II

Need Help

HI Community,

Table1:

ID, Name, Salary

100, XYZ, 2000

101, ABC, 1500

102, ADS, 2300

103, QZX, 200

104, POQ, 7500

];

can we sort the dara using FirstsortedValue ???

My OutPut should be like using FirstSortedValue:

ID, Name, Salary

104, POQ, 7500

102, ADS, 2300

100, XYZ, 2000

101, ABC, 1500

103, QZX, 200

Thanks in Advance...!!!

11 Replies
sunny_talwar

Sort the data in the script or front end object???

I don't think you need FirstSortedValue() for this

kkkumar82
Specialist III
Specialist III

Hi,

if you want it in the UI , goto sort option in the properties and select by expression and write the expression as sum(Salary) and order as Descending.

Thanks

Kiran Kumar

sunny_talwar

In a table box object you can do this:

Capture.PNG

Capture.PNG

Not applicable

Hi

ID,

Name,

Salary

Resident ABC Order by Salary DESC;

Thanks

Manju

paulwalker
Creator II
Creator II
Author

HI Sunny,

I know that front end options,

is it possible to sort using FirstSortedValue???

sunny_talwar

FirstSortedValue is a function used to find sorted value and not used for sorting itself. May be if you mention your requirement, we might be able to help you better.

Are you trying to sort in the front end or back end?

jsingh71
Partner - Specialist
Partner - Specialist

Use This:

Temp:

Load * Inline [

ID, Name, Salary

100, XYZ, 2000

101, ABC, 1500

102, ADS, 2300

103, QZX, 200

104, POQ, 7500

];

Table1:

LOAD Salary

,Name

Resident Temp

Order By Salary desc,Name;

Drop Table Temp;

Output will be:

Print.png

paulwalker
Creator II
Creator II
Author

Yeah Sunny,

I know how to sort..

Acutally i thought FirstSortedValue sorting the data.

IF am use this script or Expression side FirstSortedValue(Name, -Salary).

then waht will happen ??

sunny_talwar

What is your chart's dimension?