It's a simple case of getting the last DataRow from the DataTable, getting the values from the two fields, performing the division and then displaying the three values:
vb.net Code:
  1. Dim rows = dtRecords.Rows
  2. Dim lastRow = rows(rows.Count - 1)
  3. Dim totalOk = CInt(lastRow("TotalOK"))
  4. Dim total = CInt(lastRow("Total"))
  5. Dim yield = totalOk / total
  6.  
  7. totalOkTextBox.Text = totalOk.ToString()
  8. totalTextBox.Text = total.ToString()
  9. yieldTextBox.Text = yield.ToString("p2")
Note that the format specifier "p2" formats a number as a percentage with two decimal places, which includes multiplying by 100.