Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
kcchoi0626
Contributor II
Contributor II

Urgent! Qlikview Sorting (Order by) problem

I search many post about sorting, but i cannot find an solution.

my database only have 4 rows,

Sally is the last input.

I could like to build an cumlative sales Curve with each person sales amount Bar Chart

However, due to sorting problem Sally always be the last row whatever I do sorting or not.
I use resident load already, not sure why order by is not working. Anyone can help ?Screenshot 2023-04-01 110011.jpg

Or any other alternative for my set analysis??

IMG_5624.jpeg

Labels (2)
5 Replies
rubenmarin

Hi, values are sorted by load as they are loaded, maybe the name2 field has some values loaded previously, try setting the inline table at the beggining of the script.

Also confirm that the chart sort properties doen't have any other sort checked, it looks like it's sorted by expression value.

kcchoi0626
Contributor II
Contributor II
Author

The dataset actually come from inline table , below is the coding

estGroup:
Load * Inline [

Name2, Age2, Grouping, AMT

Wladimir, 31, IBG3, 100

Wladimir, 31, IBG4, 200

Wladimir, 31, IBG3, 300

Wladimir, 31, IBG3, 400

Sue, 22, IBG4, 500

Sue, 22, IBG4, 7

Sue, 22, IBG4, 89

Sue, 22, IBG5, 234

Tom, 34, IBG6, 333

Sally, 37, IBG1, 900

];

NoConcatenate
TestGroup2:
Load
Name2,
Sum(AMT) as Total_sales
Resident TestGroup
group by Name2;

NoConcatenate
TestGroup3:
Load
*
Resident TestGroup2
order by Total_sales desc,;


drop table TestGroup,TestGroup2;


and for the chart is sorted by Y-value

kcchoi0626
Contributor II
Contributor II
Author

I found that I even cannot sort by field Name2, the table just cannot change ordering

MayilVahanan

HI

Might be, in the sort tab, for Field Name 2, no sorting is specified [like expression, frequency, numeric value, text], in that case only, you can't able to sort by "Field name2". 

Either, you can mention Expression [Asc / desc] by Sum(Total_Sales), it will work as expected. 
And also, check the "interactive sort" option. 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
rubenmarin

Hi, if the option to sort by Y-Value is checked all the others are disabled, uncheck this option to select another sorting option.