I’ve started to put the column “Pôle” into a List to have the list of each Pole (just once). Like this, if the client wants to add a new Pole, I can have it automatically.
For the moment, I can collect each “Pôle” in a list. see below
But then, I don’t know how to sum all the amount for each “Pôle”.
Coz at the end, I need to have the result for each “Pôle” in 3 variables
A = sum Montant HT of France, Belgium
B = sum Montant HT of America, Algeria, Austria
C = etc…
But I am stuck, I don’t know how to proceed. I’ve tryied with a formula dt.compute(Sum(colname) but it’s not working (or i’m using it in a wrong way)
Thank you @NIVED_NAMBIAR for your answer.
I tryied but it’s not working. I have a global sum (and i didn’t check if it is the sum of all the amount).
But I need a sum for each “Pôle”. But i’m trying to fix this. For the moment, not succeeded.
Thank you very much @NIVED_NAMBIAR it seems to be working
I have one last (maybe simple) question, but how can i use B, F and L with their value, coz I need this values (B = 102075) to write it into the client software.
I have an error message, when I lauch with all my data, I have : “Assign: Conversion from string “” to type ‘Double’ is not valid.”
For the assign sum = dt1.AsEnumerable().Where(Function(row1) row1(“Pôle”).ToString.Equals(row(“Pôle”).ToString)).Sum(Function(row1) CDbl(row1(“Montant HT”)))