Wilmar AI Cafe
← Back to menu

AI-Built Dashboards with Copilot & Claude

We start with a finished dashboard — a real one, built entirely by AI from an Excel export — and take it apart. First see what it does, then read the exact instructions that produced it, then build your own and improve it round by round with follow-up prompts.

📅 Fri 21 Aug · 4–5 PM
📍 Wilmar office
🧭 Demo → prompt → build
⏱️ 60 min
Host · Xinran Liu

📦 Class materials

The dashboard is the finished sample result. Open it and it is already loaded with the July data — nothing to import to start looking around in section 1. Download it to keep your own copy; the data travels inside the file, so it still works with no internet and no server. The two Excel files are the source data — import August live in the dashboard to watch the whole thing rebuild. The instructions file is the prompt we walk through in section 2.

Menu

Follow along, click to expand, and build the dashboard as you go.

1
20 min

See the Dashboard in Action

Open the sample Sugar Export Market Intelligence dashboard and walk through everything it does — five pages, global filters, live Excel import, and a CSV export — all inside one HTML file with no install and no server.

What we look at, in order
  • Executive Overview — export value, volume MT, weighted USD/MT, market count, filtered row count, plus the monthly value trend, top destinations, top reporters, and product mix.
  • Products — composition by value and by volume, then the top markets and reporters for whichever product you select.
  • Markets — top destination markets, which reporters supply the market you pick, its product mix, and the annual trend.
  • Trade Routes — a Sankey diagram of reporter → destination flows, with link width by export value.
  • Data Explorer — the underlying rows with search and pagination, so any number on any chart can be traced back to source.
The three things worth noticing
  • Global filters — reporter, destination market, product, and year apply across every page at once. Change one, and all five pages recalculate.
  • Import Excel — click it, pick refined_sugar_data_aug.xlsx, and the whole dashboard rebuilds on the new data: filters repopulate, visuals refresh, filename and row count update. The file is the tool; the data is swappable.
  • Export Filtered CSV — whatever you have filtered down to goes out as a CSV, so the dashboard feeds the next piece of work instead of being a dead end.
Why a single HTML file
  • HTML, CSS, and JavaScript all live in one file that opens directly in any browser — no server, no install, no IT ticket.
  • Easy to send by email or Teams, or park in a SharePoint folder where the link never changes.
  • Small enough that AI can regenerate or revise the whole thing in one pass.
Data stays on your machine — the Excel file you import is read in the browser and never uploaded anywhere. That is what makes this pattern safe for trade data.
2
20 min

The Instructions Behind It

Everything you just saw came from one written brief. We read it line by line and pull out the pattern — the seven things a dashboard prompt has to specify if you want a usable result on the first try.

Anatomy of a dashboard prompt
  1. The data contract — which sheet, and the exact column names to use. Never let AI guess your headers.
  2. The controls — the buttons you want visible, and precisely what each one must do.
  3. The calculations — spelled out as formulas, including unit conversion. This is where silent errors hide.
  4. The exact labels — product and category names written out in full, so nothing gets paraphrased.
  5. The filters — which fields are global and apply across every page.
  6. The pages — each page named, with its visuals listed underneath.
  7. Styling and output — the look you want, and the format you want back.
1 · The data contract
Read the first worksheet and use: FLOW, REPORTER, PARTNER, COMMODITY, YEAR, MONTH, VALUE, QTY1, UNIT1
2 · The controls, with behaviour
Add visible buttons: Import Excel, Export Filtered CSV, Reset Filters. Importing a new Excel file must: - Replace the dataset - Rebuild filters - Refresh all visuals - Show filename and row count
3 · The calculations, as formulas
Calculate Volume MT dynamically: T = QTY1 KG = QTY1 / 1000 Calculate: Weighted USD/MT = Total Value / Total Volume MT

Note that this is a weighted average, not an average of averages — say so, or you will quietly get the wrong number.

4 · The exact labels
Use these exact product names: 1701.11 - Cane sugar, raw, in solid form, not containing added flavouring or colouring matter 1701.13 - Cane sugar specified in Subheading Note 2 to this Chapter 1701.14 - Other cane sugar 1701.99 - Other refined sugar
5–6 · Filters and pages
Global filters: Reporter, Destination Market, Product, Year Pages: 1. Executive Overview — Export Value, Volume MT, Weighted USD/MT, Markets, Filtered Rows, Monthly Export Value Trend, Top Destinations, Top Reporters, Product Mix by Value 2. Products — Composition by Value, Composition by Volume, Top Destination Markets for Selected Product, Top Reporters for Selected Product 3. Markets — Top Destination Markets, Reporter Origins for Selected Market, Market Product Mix, Annual Market Trend 4. Trade Routes — Sankey diagram, Reporter → Destination flows, link width by Export Value, interactive and filter-aware 5. Data Explorer — Search, Pagination, Reporter, Destination, Product, Value, Quantity, Unit, Volume MT, USD/MT
7 · Styling, validation, and output
Styling: professional executive dashboard, green / navy corporate theme, responsive layout, white cards, sticky navigation tabs, mobile friendly. Include validation for invalid rows and display row number with rejection reason. Return the completed dashboard as a downloadable HTML file.
The full brief is in Dashboard Copilot Instructions.txt above. Swap the column names, labels, and page list for your own data and the same structure works for any dataset you have.
3
20 min

Build It, Then Improve It

Now build your own. Start with a short first prompt, look at what comes back, and fix it one round at a time. The finished sample was version 15 — nobody writes that in one go.

Round 1 · Get something on screen

Keep the first prompt small. You want a layout to react to, not a finished product.

Build a single HTML file dashboard from the attached Excel export. Read the first worksheet and use the columns FLOW, REPORTER, PARTNER, COMMODITY, YEAR, MONTH, VALUE, QTY1, UNIT1. Start with one page: total export value, total volume in MT, and a bar chart of the top 10 destination markets by value. Clean, modern style on a light background. Return it as a downloadable HTML file.
Round 2 · Fix what is wrong before adding anything

Resist the urge to pile on features. Correct the numbers first — everything downstream inherits them.

Two corrections. Volume MT must be calculated per row: if UNIT1 is T use QTY1 as-is, if UNIT1 is KG divide QTY1 by 1000. And USD/MT must be total value divided by total volume, not the average of the per-row rates. Show the total row count so I can check nothing was dropped.
Round 3 · Add one capability at a time
Add global filters for Reporter, Destination Market, Product and Year at the top. Every filter must apply to all visuals at once, and add a Reset Filters button.
Round 4 · Make it reusable, not single-use
Add an Import Excel button. Importing a new file should replace the dataset, rebuild the filter lists, refresh all visuals, and display the filename and row count. Also add an Export Filtered CSV button that exports only the currently filtered rows.
Round 5 · Then polish
Move the four sections into sticky navigation tabs. Use a green and navy corporate theme with white cards, make it responsive on mobile, and format all values as USD with thousands separators.
How to give good feedback
  • Point at the specific thing. "The Top Destinations chart is showing partner codes instead of country names" beats "the charts look wrong".
  • Say what it should be, not just that it is broken. Describe the correct output and you skip a round trip.
  • Change one area per round. Fixing five things at once makes it hard to tell which instruction caused a regression.
  • Check against source. Pick a filter combination, read the number off the dashboard, and verify it in Excel before you trust the rest.
  • Keep the versions. Save each working file as v1, v2, v3 — when a round makes things worse you want somewhere to fall back to.
When to stop iterating
Stop when the dashboard answers the question you built it to answer. Extra pages nobody opens are cost, not value.
Bring your own Excel export next time. The prompt structure from section 2 plus five rounds of feedback is usually enough to get a working dashboard for your own team's data in under an hour.

After class

Built something your team would actually use? It does not have to stay on your laptop.