Feroz Khan

Feroz Khan

  • 1.4k
  • 300
  • 92.1k

How can i Sum value from Data Table Distinct Value

Dec 3 2017 10:03 AM
Dear,
 
i using C# language for showing txt file data in Datatable and its showing like beow also.
now if column (store0) if there is value distinct should be just one and second coluumn should be count the distinct value. 
for view i am using this code. 
 
DataView view = new DataView(dt); 
 
 
 
and Distince i am using below code.
DataTable distinctValues = view.ToTable(true, "Store0", "Store1");
and report showing like ok but in second column showing value ( 1 ) this should be 3, should be sum the distinct value. please i need your help for how can i sum disticnt values. 
 
 
 

Answers (2)