Using the above reference topic’s solution I am able to get the group by and sum amount of duplicate values, but it is eliminating the non- duplicate values, Test3 in this case. i need that too.
For duplicate values summation of integer values is perfect but I also need to concat column(0) and column(1) which has string values and concat is not working.
You can easily do this by using this component to group and sum the data as you need…
Use the activity Datatable Consolidate to achieve this. A user manual is also included in the component so that you can easily understand the usage of it…
For the aggregate column property I believe I will need to give the columns for which I want the summation to be done.In my case It would be form index 3-8.
I am thankful for your prompt responses, one last thing, to concat two string values, as I will have in column index 0 and 1 what should be the aggregate function to be used, I used Concat, but doesn’t work
Hmm… that part you will need to do before the aggregations. Not here. In your original datatable create a new column and have the concatinated values. Then use that column in the aggregate just like you use the others
Lets assume following:
variablename from your origin datatable: dtOrigin
variablename from your aggregated datatable: dtAggregated
dtAggregated has no columns: AllowanceName, AllowanceNature
So after aggregation add a datacolumn for e.g. AllowanceName to dtAggregation
set the ColumnPosition e.g. to first Position (Invoke Method activity)
dtOrig.AsEnumerable.Where(function (r) r(“AllowanceCategory”).ToString.Equals(r(“AllowanceCategory”).ToString)).Select(function (r) r(“AllowanceName”).toString).ToArray
use a String Array for DataType
and populate into the corresponding row
String.Join(“,”,arrAllowanceNames)
to: String.Join(“,”,arrAllowanceNames)
Do similiar also for the other column and let us know if it was working