Query To Count Number Of Requester For Each Priority Type


#1

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 .


#2

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


#3

How to create dataview in uipath?


#4

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

Thanks,
Sreekanth.k


#5

@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


How to sum the data in excel based on the product?