Which stores see shoppers exactly twice?

Why ask this?

A retailer comparing second visits can set both bounds to two. This counts people who shopped twice at that store during the period.

Start with the sample data

Open source.csv. In the first row of source.csv, Store = East, Shopper = 0.

What to say

Show the top two stores by shoppers with between two and two visits as a bar chart.

Processing time

Recorded audio to chart ready
3.01 s
Transcript to chart ready
0.40 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 composerRecorded transcript entered in the native composer

How the canvas produces the result

  1. CSV Input · Read the sample records

    source.csv supplies 5 rows. These records are the inputs to the next step.

  2. Aggregate · Count populated values in Shopper for each Store, Shopper

    If a category appears more than once, its records contribute to one result. The first output row contains Store = East, Shopper = 0, nonblank_Shopper = 2.

  3. Find / Replace · Clear values matching the saved expression

    Find & Replace applies ^(?!(?:2)$)[0-9]+$ to nonblank_Shopper. For example, Store = West, Shopper = B, nonblank_Shopper = 3 has its nonblank_Shopper value cleared.

  4. Aggregate · Count populated values in nonblank_Shopper for each Store

    If a category appears more than once, its records contribute to one result. The first output row contains Store = East, nonblank_nonblank_Shopper = 1.

  5. Column Renamer · Prepare the output columns

    nonblank_nonblank_Shopper becomes Shoppers with 2 to 2 visits. The result exposes Store, Shoppers with 2 to 2 visits.

  6. Sort · Order the results

    Sort by Shoppers with 2 to 2 visits (descending), then Store (ascending). The first rows in order are East → West.

  7. Rank · Assign a rank

    The ordered rows receive positions starting at 1. Here, East is #1, West is #2.

  8. Measure Filter · Keep the requested rows

    The filter uses rank <= 2 in keep mode. 2 rows remain including East.

  9. Column Renamer · Prepare the output columns

    Remove rank. The result exposes Store, Shoppers with 2 to 2 visits.

  10. Charts · Draw the bar chart

    Use Store for the categories and Shoppers with 2 to 2 visits for the plotted values.

Native n0is canvas for Which stores see shoppers exactly twice?

The chart

Workflow result in n0is
StoreShoppers with 2 to 2 visits
East1
West0

How to use the result

For Store East, the sample reports Shoppers with 2 to 2 visits of 1.

Synthetic test audio. Screenshots from the recorded workflow in n0is.