How to get specific value Count rows from specific column in datatable

HI,
Here is I am copy the data.

Table Data
Sr.No. Name
1 Rahul
2 Swapnil
3 Ramesh
4 Sampat
5 Rahul
6 Rakesh
7 Swapnil
8 Ramesh
9 Kedar
10 Rahul
This value come in datatable. I want to find Rahul how many times coming in that “Name” column Ans is Rahul is 3 times count.
Similarly I want each row count in datatable.
Please help me on this.
Thanks
Rahul

Hello @Rahul_Gavhane
use Filter data table activity, and save the data in different variables Like DT_Rahul
Filter condition is Column 1 contains “Rahul”

Later you can get the count by
DT_Rahul.RowCount.toString

2 Likes

HI @Rahul_Gavhane

Checkout this expression

(From d In Dt1.AsEnumerable
Group d By k=d("Column2").ToString.Trim Into grp=Group
Let f= grp(0)("Column2").ToString
Select dt.Rows.Add(f,grp.count.ToString)).CopyToDataTable


Sequence.xaml (13.2 KB)

Regards
Sudharsan

2 Likes

Hi Sudharsan,

Thanks. It is working as per my expectations.

Regards,
Rahul

That’s great @Rahul_Gavhane

Kindly close the topic by marking the appropriate post as solution , so that it will be helpful to others

Happy Automation!

Regards
Sudharsan

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.