---
title: "Assay Manager Batch List – Sample Counts"
canonical: "https://servicedesk.maxgeo.com/space/DS/1547632644/Assay%20Manager%20Batch%20List%20%E2%80%93%20Sample%20Counts"
format: markdown
---
|  |  |  |  |
| --- | --- | --- | --- |
| Application: | DataShed | Build Number: | 3.1.0 |

---

![image-20250110-005953.png](media://2573f810-2979-4537-b2fd-e44f8298b5de)

In both the Assay Manager – Batch List and Assay Batch Header tables, there are four columns summarizing the number of samples and number of results imported versus what has actually been merged into table tblAssay.

**Sample Count** being the number of unique SampleIDs in the assay file

**Results Count** being the sum of the number of analyses (elements) per SampleID

Sometimes there are discrepancies in these numbers for a batch where there are more samples than end up getting merged successfully.

When there are obvious errors and the results are stuck in the Incoming table, it’s easy to explain but sometimes nothing gets stuck in the Incoming table, no errors reported and you still get a difference between these values.

In this case it’s necessary to understand the logic used in DataShed5 to determine these counts and the exceptional circumstances that can lead to such count discrepancies.

## DataShed5 logic for determining counts

**Sample / Results Count** is based on the distinct `SampleID`in both `tblAssay` and incoming table (for any unmerged sample).

**Samples / Results Merged** is based on the distinct `SampleID` in `tblAssay` <span style="color: #ff5630">where Preferred=0</span>

Issues with reporting in assay csv files can lead to these 2 counts being different.

## No Results

If the assay file contains a sample **without** assay results (blank cell), the sample will be included in Sample Count but excluded from Samples Merged as it’s not merged into `tblAssay`

**Example:**

Sample01 will be counted in Sample Count but not reported in Samples Merged because there’s nothing to import, nothing to substitute and nothing to merge.

Results Count will be 4 more than Results Merged because there are 4 blank cells representing 4 element analyses.

![image-20250110-010227.png](media://1de8f038-5a98-4367-b289-e8f1ce01cc1b)

## Duplicated results

If the assay file contains the **same sample ID twice** with different results, the two sets will be counted as one as it’s for the same sample. One set being imported with Preferred = 0 and the other with Preferred = 1

**Example:**

Sample041 will be counted in Sample Count twice but reported as 1 result in Samples Merged.

Results Count will be 1 more than Results Merged.


![image-20250110-010253.png](media://82b46fa6-e5f0-433e-b975-0a43b7c4c17f)