I have an excel file in that i need the count how many are success and failure for each fruit.
Can you help on this please?
Thanks for the reply!!
but I need output as
Apple success /failure
Banana success /failure…etc
eg: Apple 3/5
where 3 as success and 5 as failure
Hi @Sachin_Sunny ,
Is this what you were looking for?
If so then please give this workflow a try.
FruitsCount.xaml (9.6 KB)
dt_data.AsEnumerable().
GroupBy(Function(g) Tuple.Create(g("Fruits").ToString.Trim,g("status").ToString.Trim)).
Select(Function(s) dt_data.Clone.LoadDataRow({String.Join(" - ",s.Key),s.Count},False)).CopyToDataTable()
Kind Regards,
Ashwin A.K
Thanks for the reply Ashwin
but I need output as
Apple success /failure
Banana success /failure…etc
eg: Apple 3/5
where 3 as success and 5 as failure
I’m using Windows, not legacy
dt_data.AsEnumerable().
GroupBy(Function(g) Tuple.Create(g("Fruits").ToString.Trim,g("status").ToString.Trim)).
Where(Function(w) Not w.Key.Item2.Contains("Failure")).
Select(Function(s) dt_data.Clone.LoadDataRow({s.Key.Item1,String.Format("{0}/{1}",s.Count,s.Key.Item1.Count)},False)).CopyToDataTable()
FruitsCount_v2.xaml (9.6 KB)
Kind Regards,
Ashwin A.K
I have developed the solution for this. I am attaching the project document below. Please, check.
Fruits_CountTask.zip (197.5 KB)
I hope it helps!!