i have a datatable in which look like this
basically i want it to be group by column featurename(distinct) in which it should sum in effort and complete column
specify all the featureid,featurename comma seprated
count of the featureid
assigned to comman seprated
now i want datatable to be look like this
don't know how to use the count
code
var result5= dtTaskandBugs.AsEnumerable().GroupBy(x => x["Functional Area"])
.Select(item => new
{
FunctionalArea = item.Key,
Completedsum = item.Sum(y => Convert.ToDecimal(y["Completed"])),
effortsum = item.Sum(z => Convert.ToDecimal(z["effort"])),
storyids = string.Join(",", item.Select(a => a["Storyid"]).Distinct()),
storiesename= string.Join(",", item.Select(b => b["StoryName"]).Distinct()),
Featureid = string.Join(",", item.Select(c => c["Featureid"]).Distinct()),
Featurename= string.Join(",", item.Select(d => d["FeatureName"]).Distinct()),
});