Find Jobs
Hire Freelancers

C# DataTable GroupBy/Aggregate

$10-30 AUD

In Progress
Posted over 7 years ago

$10-30 AUD

Paid on delivery
Hi, I need code to make this work I have the following code that I use to group Amounts in "Value", buy the Reference in "Account#" . // GROUP AND SUM THE VALUE COLUMN var result = (from row in [login to view URL]() let sup = [login to view URL]<string>("Account#") group row by new { sup } into grp select new { Supplier = [login to view URL], Advance = [login to view URL](r => [login to view URL]<decimal?>("value")), }).ToList(); var dt_docDAY01_GROUPED = new DataTable(); [login to view URL](new DataColumn[] { new DataColumn("Account#"), new DataColumn("DAY01"), }); foreach (var grp in result) [login to view URL]([login to view URL], [login to view URL]); But the above code wont work for my current project. I have a Reference in column 1. "Ref", and days of the month "DAY1" through to the corresponding days off the month be it "DAY28"/"DAY30"/"DAY31" etc. Example of first 3 day here.... (random example data) REF | DAY1 | DAY2 | DAY3 | A | 1 | | | C | 9 | | | D | 1 | | | F | 6 | | | G | 5 | | | A | | 2 | | B | | 3 | | C | | 4 | | D | | 5 | | F | | 6 | | H | | 7 | | B | | | 3 | M | | | 4 | C | | | 5 | G | | | 6 | I | | | 7 | J | | | 8 | I need it to be grouped to give the following result. The code needs to be dynamic to allow for more or less days 1 through to 31 etc. Example grouped below.... (From above random example data) REF | DAY1 | DAY2 | DAY3 | A | 1 | 2 | | B | | 3 | 3 | C | 9 | 4 | 5 | D | 1 | 5 | | F | 6 | 6 | | G | 5 | | 6 | H | | 7 | | I | | | 7 | J | | | 8 | M | | | 4 | This project is to provide code to dynamically allow for up to all 31 columns, or any better code i can use. thank you
Project ID: 11420778

About the project

6 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
6 freelancers are bidding on average $31 AUD for this job
User Avatar
Hello, I hope you doing very well! I have gone through the description and would like to provide a quality solution using my 5+ years of professional experience in required skills. (.NET/ASP.NET - MVC, EF, SQL, C#). Awaiting for your positive response so we can have final talk and start project immediately :)
$25 AUD in 1 day
5.0 (11 reviews)
4.0
4.0
User Avatar
Hi, I have understood your requirements. I have been working as .Net developer from past 3 years. I have developed dozens of web and desktop apps. I have strong programming and communication skills. I can deliver you quality work within very less time. Please visit my portfolio to see my work. For further details please send me message. Thanks & Regards, Umar
$25 AUD in 1 day
4.4 (7 reviews)
3.5
3.5
User Avatar
Hi sir....! I read your description and Will do that task just easily. I am professional software developer and will write efficient and bugs free code for you.
$25 AUD in 1 day
4.9 (5 reviews)
2.6
2.6
User Avatar
I am currently a Software Engineer. I had 3 years working with C# including desktop application, website, back-end, rest-api ...
$35 AUD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
MAnsfield, Australia
5.0
14
Payment method verified
Member since Mar 26, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.