Cannot get expect output when using "Sort Data Table"

Dear ALL

I found a way to add “SUM” formula then auto fill to the rest of the rows

But i have got another problem when trying to sort the “SUM” by Descending order.

The result did not return properly. See below:

My expected result is as below (figures show in proper descending order, so that I can process next step):

My workflow as enclosed. May I see if i have made any mistake there and pls help to advice any possible way to solve this (89.4 KB)

Thank you

@Sally_YUEN What operation have you performed for Sorting it in Descending order?

Do you mean “Activity”?

I use Sort DataTable (not the one under Excel activities, coz i donno how to use it yet)

@Sally_YUEN Check this updated Workflow : (41.5 KB)

i tired to run this new workflow but error showing as below

@Sally_YUEN Are you using a Different input file?

No. I’m using the original input file

@Sally_YUEN Strange :thinking: It executes properly and I get the Output in Descending Order of the Sum Column in my System. :sweat_smile:

@Sally_YUEN I have used another method to sort the Datatable but it makes use of another Activity For which you would need to Install the Activity through the Manage Packages and use it, or else it won’t be available.
The reason why the Sort Datatable doesn’t sort the Column in the Proper Descending order is because the Datatype of that Column isn’t a Double or an Number type of Data. It represents as an Object Type and hence you directly cannot Sort the Column.
Using the Below Activity you can change the Column Datatype to Double and then use Sort Datatable which works perfectly well as I have tested it.

I have updated the Workflow to get the Output using Change Column Datatype Activity. Please Check. After you have opened the Workflow, there may be a missing Activity which would be proper after you have Installed the above activity mentioned. (41.0 KB)

Thank you so much.

I got it :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.