I have a datatable in the following form
Country Currency Category Value (Delivered)
AFRICA USD CONTAINER 100
AFRICA USD CONTAINER 100
AFRICA USD PLASTIC 100
AFRICA USD PLASTIC 100
AFRICA USD PLASTIC 100
AFRICA USD PLASTIC 100
AFRICA USD PLASTIC 100
AFRICA USD PLASTIC 100
I need to get the values as below,
COUNTRY Currency CONTAINER PLASTIC OTHERS
Africa USD 200 600 0
Means, anything other than plastic or container, need to be added in others column.
You can use NReco.PivotData nuget package for this purpose:
Library is free for single-deployment non-SaaS projects (I'm the author of this lib).