I have two spreadsheets containing ID numbers where people have submitted their SSN details (dt1 and dt2).
I need to report the percentage simularities between SSN_Number values by using a third spreadsheet, dt3.
Dt3 should show a summary row containing a count of potential matches and highest percentage match value.
Join the two data tables based on ID column> outputDT
After performing join, use add Data column “Matchperc”
loop on Output DT>
assign it to percentageMatch.
assign currentRow(“Matchperc”)=percentageMatch
exit loop
assign ResultsDT= (From d In DT.AsEnumerable
Group d By d("ID").ToString.Trim Into grp=Group
Select R=grp.OrderBy(Function (r) r("Matchperc")).First()).CopyToDataTable
Here ResultsDT and OutputDT are of type DataTable.
Thank you for explaining. If dt2 doesn’t have the IDs is there another way to do this?
I’ve just been made aware that the dataset has just been updated. I’ve just updated the post to reflect.
Then you would have to do Nested loops
Build Data Table: ID,SSN_Number, SSN_noDt2, MAtchperc> Output to DT3
Parent loop on DT1:
Child loop on DT2,
Create a 3rd DT and
add dataRow to Dt3 with all 4 values after calculating match percentage the same way.