I am trying to pivot my data by year and month. The pivot works fine, but it is in random order.
I can't seem to figure out how to order the data by the year and month.
Values is the pivoted data.
I can't seem to put an orderby anywhere that doesn't give me an error.
Thanks,
Tom
I can't seem to figure out how to order the data by the year and month.
Code:
var rows = source.GroupBy(rowSelector.Compile() )
.Select(rowGroup => new
{
Key = rowGroup.Key,
Values = columns.GroupJoin(
rowGroup,
c => c,
r => columnSelector(r),
(c, columnGroup) => dataSelector(columnGroup))
});
I can't seem to put an orderby anywhere that doesn't give me an error.
Thanks,
Tom