Iam getting error when iam using LINQquery to group rows by one column can anybody solve th issue

There are some syntax error in your query
check updated query below


(From rw In ouputdt.AsEnumerable() Group By rw("Brand Name").ToString.Trim Into grp = Group 
Select final.rows.add({grp.sum(Function(x)convert.ToDouble(x("Quantity").ToString))})).CopyToDataTable

I worked with above code also previous but the keywords are getting like from,group,select in lower case but it is showing errors like Group,rw,grp are not in specified context.

I added all necessary namespaces also.will you please tell is there any settings change or else my flow is wrong

Check if namespace System.Linq is imported, else import it.
If the above does not work, then if possible upload copy of Main.xaml and project.json

please share me your maild .

The Statement IS Missing the following assignment

grp=Group

Maybe you can also Share the expected Output. Currently only the counts without a relationship to the corresponding Key IS retrieved