Good Day Experts!
I have what seems to be a a straightforward little project, but I would like to check with you to see if there is a better way to do it. My DataTable looks something like this:
Customer Invoice Amount
A 123 $10
A 546 $20
A 111 $15
B 999 $33
B 888 $44
C 765 $66
C 777 $22
I need to loop through the DataTable and total amount based on Customer A=$45 B=$77 C=$88.
As I loop, I need to stop adding to the total amount when the Customer changes. But, how do I dynamically create the variables to hold the total amounts? It feels like I need to run a Select Customer, Sum(Amount) on DataTable Group By Customer query on the DataTable.
Can you help me with suggestions on how to get started on achieving my end goal?
Thanks,
jimbo99999
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.