Example: Sales Dashboard

This example builds an interactive sales dashboard with charts, multiple views, and dynamic filtering.

What We’re Building

A sales dashboard that:

  • Displays revenue by region with a bar chart
  • Shows product mix with a pie chart
  • Allows filtering by time period
  • Has separate views for overview and detailed data entry

Step 1: Create the Excel Spreadsheet

Sheet1 (Dashboard)

Layout for the dashboard view:

ABCDEFGH
1Sales Dashboard
2
3Time PeriodQ1 2024
4
5(Chart area for regional sales - spans A5:D15)(Chart area for product mix - spans E5:H15)
6-15
16
17Summary
18Total Revenue=SUM(Data!B2:B5)
19Top Region=INDEX(Data!A2:A5, MATCH(MAX(Data!B2:B5), Data!B2:B5, 0))
20Growth=Data!F2

Sheet2 (Data Entry)

Where users can update the underlying data:

ABC
1Enter Sales Data
2
3RegionRevenue
4North125000
5South98000
6East156000
7West112000
8
9[Back to Dashboard]

Sheet3 (Data - Hidden calculations)

Chart source data and calculations:

ABCD
1Regional Sales [Revenue ($)]
2RegionQ1 2024
3North125000
4South98000
5East156000
6West112000
AB
10Product Mix
11
12Product A180000
13Product B145000
14Product C95000
15Product D71000
EF
1Metrics
2Growth12%

Step 2: Configure Charts

Regional Sales Chart (Bar)

Source data in Data sheet, A1:B6:

AB
1Regional Sales [Revenue ($)]
2RegionQ1 2024
3North125000
4South98000
5East156000
6West112000

Product Mix Chart (Pie)

Source data in Data sheet, A10:B15:

AB
10Product Distribution
11
12Product A180000
13Product B145000
14Product C95000
15Product D71000

Step 3: Configure NExS.app

ABCDE
1appSales Dashboard
2chartOptions
3palette#3366cc, #dc3912, #ff9900, #109618
4fontSizemedium
5backgroundColorwhite
6viewDashboard!A1:H20
7nameOverview
8backgroundColor#f8f9fa
9editableB3
10chartA5:D15
11sourceData!A1:B6
12typebar
13sortdescending
14chartE5:H15
15sourceData!A10:B15
16typepie
17buttonH20
18view’Data Entry’!A1:C9
19nameEnter Data
20editableB4:B7
21buttonA9

Step 4: Configure Buttons

Dashboard View - “Enter Data” Button (Dashboard H20)

Cell content: Edit Data {setView: 'Enter Data'}

Data Entry View - “Back” Button (Data Entry A9)

Cell content: Back to Dashboard {setView: 'Overview'}

Step 5: Add Time Period Filter

Create a dropdown for the time period:

In Excel, use Data Validation on Dashboard B3:

  • Allow: List
  • Source: Q1 2024, Q2 2024, Q3 2024, Q4 2024

Then use formulas in the Data sheet to look up values based on the selected period.

Example with VLOOKUP

Create a lookup table (Sheet4 - AllData):

ABCDE
1RegionQ1 2024Q2 2024Q3 2024Q4 2024
2North125000132000145000158000
3South98000105000112000120000
4East156000168000175000190000
5West112000118000125000135000

In Data sheet, B3 formula:

=VLOOKUP("North", AllData!A:E, MATCH(Dashboard!B3, AllData!1:1, 0), FALSE)

Now changing the time period dropdown updates all the charts!

Step 6: Embed on Your Website

Basic Embed

<iframe
  src="https://platform.nexs.com/app/YOUR-APP-ID"
  width="900"
  height="600"
  style="border:0;">
</iframe>

Full-Page Dashboard

<!DOCTYPE html>
<html>
<head>
  <title>Sales Dashboard</title>
  <style>
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: #f0f2f5;
    }
    .header {
      background: #1a237e;
      color: white;
      padding: 20px 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .header h1 {
      font-size: 24px;
      font-weight: 600;
    }
    .header .period {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .header select {
      padding: 8px 15px;
      font-size: 14px;
      border: none;
      border-radius: 4px;
    }
    .dashboard-container {
      padding: 30px;
    }
    .metrics-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
      margin-bottom: 30px;
    }
    .metric-card {
      background: white;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    .metric-card .label {
      font-size: 14px;
      color: #666;
      margin-bottom: 5px;
    }
    .metric-card .value {
      font-size: 28px;
      font-weight: bold;
      color: #1a237e;
    }
    .metric-card .change {
      font-size: 14px;
      color: #4caf50;
      margin-top: 5px;
    }
    .charts-row {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 20px;
    }
    .chart-card {
      background: white;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    .chart-card h3 {
      font-size: 16px;
      color: #333;
      margin-bottom: 15px;
    }
    .nexs-embed {
      width: 100%;
      min-height: 400px;
    }
  </style>
</head>
<body>

<div class="header">
  <h1>Sales Dashboard</h1>
  <div class="period">
    <span>Period:</span>
    <select class="nexs__input" data-nexs-cell-addr="Dashboard!B3">
      <option>Q1 2024</option>
      <option>Q2 2024</option>
      <option>Q3 2024</option>
      <option>Q4 2024</option>
    </select>
  </div>
</div>

<div class="dashboard-container">
  <div class="metrics-row">
    <div class="metric-card">
      <div class="label">Total Revenue</div>
      <div class="value">
        <span class="nexs__output_formatted" data-nexs-cell-addr="Dashboard!B18"></span>
      </div>
      <div class="change">+<span class="nexs__output_formatted" data-nexs-cell-addr="Dashboard!B20"></span> vs last quarter</div>
    </div>
    <div class="metric-card">
      <div class="label">Top Region</div>
      <div class="value">
        <span class="nexs__output_raw" data-nexs-cell-addr="Dashboard!B19"></span>
      </div>
    </div>
    <div class="metric-card">
      <div class="label">Active Products</div>
      <div class="value">4</div>
    </div>
  </div>

  <div class="charts-row">
    <div class="chart-card">
      <h3>Revenue by Region</h3>
      <!-- The NExS app handles the chart rendering -->
      <div class="nexs-embed">
        <script class="nexs"
          src="https://static.nexs.com/js/nexs_embed.js"
          data-nexs-app-url="https://platform.nexs.com/app/YOUR-APP-ID">
        </script>
      </div>
    </div>
  </div>
</div>

</body>
</html>

Complete NExS.app Worksheet

ABCDE
1appSales Dashboard
2modeopen
3chartOptions
4palette#3366cc, #dc3912, #ff9900, #109618
5fontSizemedium
6backgroundColorwhite
7viewDashboard!A1:H20
8nameOverview
9backgroundColor#f8f9fa
10editableB3
11chartA5:D15
12sourceData!A1:B6
13typebar
14sortdescending
15legendnone
16chartE5:H15
17sourceData!A10:B15
18typepie
19legendright
20buttonH20
21view’Data Entry’!A1:C9
22nameEnter Data
23editableB4:B7
24buttonA9

What You Learned

  • Creating dashboards with multiple charts
  • Configuring bar and pie chart types
  • Using chart options (sort, legend, palette)
  • Building multi-view apps
  • Dynamic data filtering with dropdowns
  • Using Excel formulas (VLOOKUP, INDEX/MATCH) for interactivity
  • Custom styling with the Declarative API

Enhancements to Try

  1. Add more time periods — Extend the dropdown and lookup table
  2. Drill-down views — Add buttons on chart regions that navigate to detail views
  3. Export functionality — Add a button that triggers sendData for reports
  4. Team mode — Convert to team mode so multiple users can update data

Next Steps