Query To Count Number Of Requester For Each Priority Type

hey everyone. Need a quick response.
i have this excel sheet where some requester names and their priorities are mentioned.
So what we need to do is ,to count the no. of requester for all the individual priority type.
for eg. in priority 1 there are 10 requester and so on. please suggest me some ways .

Hi @Debasmita,

Group by priority then take the count

DataView view = new DataView(table)
DataTable distinctValues = view.ToTable(true, “Priority”)

loop through the distinctValues datatable using for each

inside for each
dtMain.select(“Priority='”+row(“Priority”).ToString()+"').length

Regards,
Arivu

1 Like

How to create dataview in uipath?

Assign View = New DataView(myTable) as a DataView variable;
View.Sort = “Column1, Column2,Column3 DESC”. @Debasmita

Thanks,
Sreekanth.k

@Debasmita

Dictionarty=( From p in dta.Select
group p by Department=p.Item("Priority") Into GroupA=Group
Select GroupA).ToDictionary(Function(x) x(0)("Priority").ToString, Function(x) Convert.ToString(x.Count))) 

Now you can access the count by using the priority.

Refer this post for more details

Regards,
Mahesh