How to build your first Retool dashboard
Overview
Learn how to build an interactive revenue dashboard in Retool using AI-assisted development. You'll connect sample data, generate a working app with a prompt, and refine it into a polished tool your team can use.
Dashboards are one of the most popular Retool use cases. They transform raw data into interactive visualizations that teams actually use—and with the platform's low-code approach, you can build custom applications and business dashboards in an afternoon instead of weeks.
In this tutorial, you'll connect sample data to build a revenue dashboard with interactive charts and tables, filters, and drill-downs that make your data actionable.
What we're building
A revenue dashboard that includes:
- KPI cards: Total revenue, order count, average order value
- Trend chart: Weekly revenue visualization
- Category breakdown: Revenue by product category
- Order table: Recent orders with interactive filters
- Drill-downs: Click to view order details in a slide-out drawer
This covers the essentials of building powerful internal tools: data visualization, interactivity, and real-time data updates.
Follow along: Download sample data to build this dashboard:
- orders.csv - 150 orders from Sept-Oct 2025
- categories.csv - 6 product categories
Step 1: Connect your data source
Before building, connect to your data so Retool can read your schema and generate queries automatically. Having your data connected first allows the AI to understand your tables, columns, and relationships, resulting in more accurate generated queries.
Option A: Retool Database (fastest)
Use RetoolDB—our managed PostgreSQL database with a spreadsheet-like interface:
- Go to Resources > Create new > Resource
- Select Retool Database
- Select the + button on the left, then select Import from CSV and upload
orders.csvandcategories.csv - Tables are created automatically with the correct schema

For production data, connect to your existing data sources:
- Go to Resources > Create new
- Select your database (Postgres, Snowflake, MySQL, BigQuery, Databricks) or API
- Configure connection details
- Name it clearly (e.g.,
analytics_warehouse)
Step 2: Generate your dashboard with a prompt
Next, it’s time to build your app by starting with a prompt. Be specific about what you want while letting the AI handle the implementation details.
Open the Assist tab
- From your Retool home screen, click Create > App
- Click the Assist icon in the lower-left corner
- If you don't see it, check Settings > AI and verify that the Retool AI and Assist Tab settings are toggled on.
Write your prompt
Be specific about components, layout, and data sources. Here's an example of what an effective prompt looks like:

- @mention your data sources (@RetoolDatabase) so Retool can read schema
- Specify exact UI components you want (KPI cards, line chart, table)
- Define layout preferences to get the structure you envision
- Request simple, maintainable queries that other team members can understand
The more specific you are about the structure, the less manual refinement you'll need afterward. Think of it as giving clear requirements to a colleague—the AI will make intelligent decisions within those constraints.
Review and accept
Retool generates:
- SQL queries that connect and query data (you’ll be asked for approval before any queries are run)
- Text, Chart, and Table components
- Bindings between queries and components
- A 12-column grid layout
This isn't a black box—you can see exactly what code is generated before it's added to your app. Review the diff to understand what's being created, then click Accept changes.

Step 3: Refine queries and layout
Now that you have your initial concept, it’s time to refine. You can edit manually by writing your own queries and arranging your components, you can edit with prompts, you can drop to custom code, or switch between all three approaches.
Adjust SQL queries
Open any generated query to modify it. You can add filters, transform the data returned from your query, or configure event handlers that run when the query succeeds or fails. For example, show a success notification when data updates, or display helpful error messages to users when a query fails.
If you don’t want to modify your queries yourself, you can do it from a prompt. Try, "Add a filter for category when [your category filter] has a value."
The choice is yours: edit SQL directly for precise control, or describe what you want and let Assist handle the implementation.
Refine the layout
Just like you can refine your queries manually or with AI, you can edit your UI the same way.
Drag and drop components on the canvas to adjust their positioning— or add new components. Common refinements include:
- Resizing charts
- Repositioning filters
- Rearranging KPI cards
- Expanding the table

You can also prompt the Assist tab with layout changes: "Move the filters to the left side and make the table span the full width" or "Stack the KPI cards horizontally at the top."
You can freely mix both approaches—drag a few components, then prompt for the next adjustment.
Style components
Once you’ve laid out your components how you’d like, Retool gives you extensive control on how you style them.
Appearance section
Use the Appearance section of the Inspector to customize the appearance of any component in Retool. You can change row colors in tables, border radiuses for containers, padding for text components, and so much more. Read more about appearance customization here.
Conditional formatting
Make data stand out visually with conditional formatting. To modify a column's background color, select your table, navigate to Columns, choose the column you want to style, and open the Appearance section. For example, set the total column's background color to {{ currentSourceRow.total > 200 ? '#9ed692' : '#d68b7c' }} to highlight high vs. low order values.
Themes
Apply organization-level themes with your brand colors and typography. Navigate to Settings > Themes to create custom themes that can be reused across all your apps.

Bulk editing
You don’t have to style each component individually. Select multiple components (click and drag, or Cmd/Ctrl + click) and edit them simultaneously in the Inspector. Change colors, fonts, or spacing for several components at once.
Or prompt the Assist tab for styling: "Make revenue values bold and green," "Apply a red background to orders with status 'cancelled'," or "Update the application to use our brand colors, fonts, and logo."
Step 4: Add interactivity
Static dashboards display data. Interactive dashboards help teams make decisions. Event handlers transform your dashboard from a report into a tool that drives action.
Retool supports many interactive elements:
- Chart interactions: Click on data points to filter other components or trigger queries
- Row actions: Add buttons to table rows for actions like view, edit, or delete
- Drill-downs: Open drawers or modals to show detailed information without leaving the page
- Form submissions: Update data and refresh displays automatically
- Component triggers: Chain actions across multiple components with success handlers
Add chart interactivity
Let’s add interactions to your bar chart. Using event handlers, we’ll make it so that when users click a bar, the entire dashboard filters to that category, letting them drill from high-level trends to specific details without leaving the page.
Manual setup:
- Select your bar chart
- Go to Interactions section of the Inspector
- Add event handlers for the Select event
- Trigger the queries powering your table, KPI cards, and trend chart
- Update those queries to filter on the selected category
Or, you could put a prompt like this in the Assist tab:
Retool will add the necessary event handlers and modify your queries to include conditional filtering. Review the changes to see how it references the selected data point in your SQL WHERE clauses.

Step 5: Secure and share
Retool apps ship with strong defaults: SOC 2 Type II compliance, granular permissions, audit logs, and environment-level resource access. You can deploy on Retool Cloud or self-host on your own infrastructure, integrate with your existing identity provider, and configure role-based access control to ensure apps meet your organization's security requirements.
Once you've built your dashboard, you can also configure permissions to control who can access and modify it.
Control access with permission groups
Create permission groups that reflect how your team works. Common patterns include:
- Analysts: View-only access with Use permissions to run queries and filter data
- Operators: Can edit specific fields with Use + Edit permissions but can't modify queries
- Admins: Full control with Own permissions to modify queries, manage permissions, and deploy changes
From the Retool homepage, navigate to Settings > Permission to create custom groups or use the default groups (All Users, Admin). For each group, set app permissions to Use, Edit, or Own. You can also configure resource permissions by environment—for example, giving developers Edit access to staging resources while restricting production access.
Where to go next
Once you've built your first dashboard, try building another one on top of your own data.The patterns you learned here—KPI cards, interactive charts, filtered tables, and permission controls—apply to virtually any dashboard use case.
Retool's combination of drag-and-drop components, SQL and API integrations, and AI-assisted building makes it straightforward to create custom internal tools that scale across your organization.
Retool dashboard FAQs
Use separate development, staging, and production environments. Organize queries into folders (reads/, writes/, filters/) with clear naming conventions (get_, update_). Create permission groups that mirror your org structure and use Source Control to version dashboards. Build Modules or Query Library entries for shared logic.
Select only needed columns, use database indexes, and paginate tables server-side. Break complex logic into smaller queries and use Success handlers to orchestrate them. Profile slow queries and consider materialized views for heavy aggregations.
Dashboards combine queries that fetch data, UI components (Text, Chart, Table) that bind to query results using {{ query.data }}, event handlers that trigger actions, and temporary state for cross-component communication. Components bind to queries, queries reference components using {{ component.value }}, and event handlers orchestrate the flow.
Use permission groups for role-based access control. Configure OAuth so queries inherit user permissions. Enable audit logging to track data access. For sensitive data, implement row-level security in your queries and consider self-hosting Retool for additional control.


