Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

maxloveiii
New Contributor

How to sort numeric by function in script?

     I 'm having a problem. I want to sort numeric data (Smallest to Largest).

Example.

row     A, B, C

1     4, 8, 2

2    2, 5, 1

?(A,B,C)    Return 248  (row 1)

?(A,B,C)    Return 125  (row 2)

What a function to solve this?

Thanks for any help.

1 Solution

Accepted Solutions
MVP
MVP

Re: Re: How to sort numeric by function in script?

One way could be like attched sample.

9 Replies
antoniotiman
Honored Contributor III

Re: How to sort numeric by function in script?

You use the Rank function in Order. You see Guide.

Regards

sivarajs
Valued Contributor II

Re: How to sort numeric by function in script?

Sorting the column is possible only with resident load not directly on files.

So load the file and use order by in resident load.

Tab1:

Load * from test .xlx;

Tab2:

Load * from resident Tab1 order by Column_name asc/desc; ( silmilar to sql order by)

Highlighted
maxloveiii
New Contributor

Re: How to sort numeric by function in script?

Could you please give me example or QVW file?

maxloveiii
New Contributor

Re: How to sort numeric by function in script?

Thanks

But I want to sort by row and concatenate to new value.

MVP
MVP

Re: How to sort numeric by function in script?

Try to create a sample app with inline data and share here explaining expected output.

maxloveiii
New Contributor

Re: How to sort numeric by function in script?

This QVW File for explain my expect output.

MVP
MVP

Re: Re: How to sort numeric by function in script?

One way could be like attched sample.

Not applicable

Re: How to sort numeric by function in script?

What logic are you using to transform the data.

If 312 is to be transformed as123 then how 488 remains unchanged and 991 changed to 199

maxloveiii
New Contributor

Re: How to sort numeric by function in script?

Because  312 sort by ascending order = 123

               488 sort by ascending order = 488

               991 sort by ascending order = 199