Count Unique Pair Values of a row in two columns in a single excel

Hello Guys,

I am having one excel with multiple columns and I am Pair of unique values and count those records and update the number in another Sheet.

Hi @BotMagicv18

Basically you need to create a pivot table with count. or this you can use pivot table activity or you can logically implement it using default view property of datatable

Regards
Roshan

Nb: Please mark as a solution if found useful :slight_smile:

@BotMagicv18

create a result table with build datatable activity and configure 3 columns - dtResult
Name, State, String

Use an assign:
left side: dtResult
right side:

(From d In yourdatatableVar.AsEnumerable
Group d by k1=d(0).toString.Trim, k2=d(1).toString.Trim Into grp=Group
let ra= New Object(){k1,k2, grp.Count}
Select dtResult.Rows.Add(ra)).CopyToDataTable

use dtResult and write range for writing it to EXCEL

1 Like