Please delete the new lines and write whole code in one line, like below
(From d In nakonfilteradt.AsEnumerable() Group d By k=d("TEKUĆE STANJE DUGA").toString.Trim Into grp = Group Let coun = grp.count Let s = grp.Sum(Function(x) If(IsNumeric(x("TEKUĆE STANJE DUGA").ToString.Trim),CDbl(x("TEKUĆE STANJE DUGA").ToString.Trim),0)).ToString Let ra = New Object(){k,s,coun} Select r = newdt.Rows.Add(ra)).CopyToDataTable()
Unzip and then open…Any ways I had the same code in it…I guess yo are on older version so try removing new lines and give everything in single line
I hope you gave the same what I copy pasted. Just to verify can you try unzipping the zip file and then open and if you can paste the code you are using here also will help
I’ve tryed everything, but without success.
Do you have some time to schedule a meeting with me today or tomorow, just not to waste time in solving problem?
Thank you for understanding…
After few steps of testing it succeded. Thank you… The last step is to get data from data table without rows where first column is empty or null.
How could we manage it?
Thank you very much. I have one more question, if you have time…
This is the last code you suggested and it works, but I forgot to tell you that I have to add one more column:
(From d In nakonfilteradt.AsEnumerable() Group d By k=d(“TEKUĆE STANJE DUGA”).toString.Trim Into grp = Group Let coun = grp.count Let s = grp.Sum(Function(x) If((x(“TEKUĆE STANJE DUGA”).ToString.Trim.IsNumeric),CDbl(x(“TEKUĆE STANJE DUGA”).ToString.Trim),0)).ToString Let ra = New Object(){k,s,coun} Select r = newdt.Rows.Add(ra)).CopyToDataTable()
but now I have to add column “VRSTA KREDITA NA 4 NIVOU” to the original query (so grouping is needed by “TEKUĆE STANJE DUGA” and “VRSTA KREDITA NA 4 NIVOU” , and also I have to add that new column to query result).
Could you help me with this?
(From d In nakonfilteradt.AsEnumerable() Group d By k=d(“TEKUĆE STANJE DUGA”).toString.Trim, k1=d("VRSTA KREDITA NA 4 NIVOU").toString.Trim Into grp = Group Let coun = grp.count Let s = grp.Sum(Function(x) If((x(“TEKUĆE STANJE DUGA”).ToString.Trim.IsNumeric),CDbl(x(“TEKUĆE STANJE DUGA”).ToString.Trim),0)).ToString Let ra = New Object(){k,k1,s,coun} Select r = newdt.Rows.Add(ra)).CopyToDataTable()
Change column names if wrong.This groups by both the columns
Please mark the solution if resolved. Else happy to help