Which clinics saw the most distinct patients?
Why ask this?
A clinic manager planning outreach needs to know how many different patients each clinic serves. Repeat appointments raise visit volume while adding no new patient to that clinic’s reach.
Start with the sample data
Open source.csv. In the first row of source.csv, Clinic = East, Patient = P1.
What to say
Show the top two clinics by number of distinct patients as a bar chart, breaking ties alphabetically.
Processing time
- Recorded audio to chart ready
- 3.91 s
- Transcript to chart ready
- 0.36 ms
One local replay from recorded audio through transcription and native chart data preparation. Recording time and screen painting are excluded.
See the transcript in the composer

How the canvas produces the result
- CSV Input · Read the sample records
source.csv supplies 5 rows. These records are the inputs to the next step.
- Unique Filter · Keep the first row for each Clinic, Patient
Read the rows in order and keep the first occurrence of each Clinic, Patient value. The first retained record has Clinic = East, Patient = P1.
- Aggregate · Count populated values in Patient for each Clinic
If a category appears more than once, its records contribute to one result. The first output row contains Clinic = East, nonblank_Patient = 1.
- Column Renamer · Prepare the output columns
nonblank_Patient becomes distinct_Patient. The result exposes Clinic, distinct_Patient.
- Sort · Order the results
Sort by distinct_Patient (descending), then Clinic (ascending). The first rows in order are West → East → North.
- Rank · Assign a rank
The ordered rows receive positions starting at 1. Here, West is #1, East is #2, North is #3.
- Measure Filter · Keep the requested rows
The filter uses rank <= 2 in keep mode. 2 rows remain including West.
- Column Renamer · Prepare the output columns
Remove rank. The result exposes Clinic, distinct_Patient.
- Charts · Draw the bar chart
Use Clinic for the categories and distinct_Patient for the plotted values.

The chart

| Clinic | distinct_Patient |
|---|---|
| West | 2 |
| East | 1 |
How to use the result
For Clinic West, the sample reports distinct_Patient of 2.
Synthetic test audio. Screenshots from the recorded workflow in n0is.