Sorting Data Table after filtering and AutoSum

I am using the filter data table to filter out required data then I am writing those into a separate sheet. If I want to write sorted data instead of a normal write what should I do?

I want to sum the INT values too at the bottom of the INT value column.

image

Hi.
You can use this statement for integer column
dt = dt.AsEnumerable.OrderBy(Function (row) CInt(row("YourColumnName"))).CopyToDataTable

1 Like

thank you but it would be helpful for me if you tell me a bit more detail about where in which sequence I should use this command

Have a look on Sort Data Table activity. It has userfriendly interface and can help you.

Write that in Assign activity (see screenshot)
image

this is the error message I am getting while tryna assign this command in assign act.

Create a new variable, use Assign activity, then Add Data Row

sum = dt.AsEnumerable.Sum(Function (row) CInt(row(“Name”)))

image

maybe I am missing something

image

using the same command with this design. Maybe there are some internal errors. Thanks again for your help

image

You should NOT write equals sign in ‘Value’ section, because there is one between ‘To’ and ‘Value’
image

1 Like

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