Linq Group By and Sum

Hello,

I’m not sure this is the best way, however I got this to work by manipulating the data to a delimitted format using the below steps.

  1. Store GroupBy expression to a variable of type IEnumerable< Object >

The Output of this returns:
image

  1. Concatenate the header to the items in the list using .Split and .Select

Without the headers, we have this:
image

So our new output looks like this with headers:
image

  1. Lastly, convert to a table.
  • Using either Generate Data Table or Write Text File / Read CSV

I chose to use Write Text File because I have issues with Generate working.
So below shows an example of this.
image

Hopefully this is helpful.

Thanks, and Regards.

C

3 Likes