*** title: Create a dashboard using Postman Flows updated: 2025-01-25T00:00:00.000Z topictype: tutorial slug: docs/postman-flows/tutorials/advanced/create-a-dashboard-in-flows max-toc-depth: 2 ---------------- Dashboards are useful for visualizing and simplifying large amounts of data. For example, you can create an internet-of-things (IoT) dashboard that displays information about your home's thermostat, door locks, security cameras, and environmental sensors. Or you can create a dashboard that compares a stock's price to a market index to evaluate the stock's performance. The dashboard can visualize data with a true/false display and a line chart. This tutorial shows you how to create a stock performance dashboard using test data from a Postman mock server. You can view the [completed flow](https://www.postman.com/postman/utility-flows/flow/64123b57c224290033fcb089/) in the [**Utility Flows**](https://www.postman.com/postman/utility-flows/overview/) workspace. ## Goal Create a flow that quantifies a stock's performance by comparing it to a market index. ## Prerequisites * A [Polygon.io](https://polygon.io/) account. * A Polygon.io API key. ## Creating the flow 1. Begin by [forking](/docs/collaborating-in-postman/using-version-control/forking-elements/) (copying) the [**stocks** collection](https://www.postman.com/postman/utility-flows/collection/qm3apv9/stocks?action=share\&creator=21580188) and the [**stocks-tutorial** environment](https://www.postman.com/postman/utility-flows/environment/21580188-07226525-53d7-40ca-b9d3-6cac35c39306) from the [**Utility Flows**](https://www.postman.com/postman/utility-flows/flows-get-started) workspace to your workspace. In your fork of the **stocks-tutorial** environment, replace the `` value with your Polygon.io API key and select **Save**. * Create a new flow and connect three **HTTP Request** blocks to the **Start** block. Add three Send blocks * In the first two **HTTP Request** blocks, select the **get the close price** request. In the third **HTTP Request** block, select the **get stock SMA** request. * In the first **HTTP Request** block, select the **stocks-tutorial** environment. Flows prompts you to select the same environment for the other two **HTTP Request** blocks. Select **Update All**. Select the environment * Add a **String** block to assign the `VOO` market index to the `ticker` variable in the first request. The flow will compare your stock's performance to this index to check if your stock is outperforming the market. * Add another **String** block to assign `AAPL` to the `ticker` variables in the second and third **HTTP Request** blocks. ![Dashboard flow - step 1](https://assets.postman.com/postman-docs/v10/flows-tut-db-step1-v10-1.jpg) 2. Connect an **Evaluate** block to the first **HTTP Request** block. Change `value` to `benchmark` and select `body`. * In the FQL window, enter "((benchmark.close - benchmark.open) / benchmark.open) \* 100". This will get a percentage of the difference between the `VOO` index's open and close price. * Connect another **Evaluate** block to the **Evaluate** block you created. In the FQL window, enter "value2 > value1". You'll add `value2` in a later step. * Connect a **Display** block to the `value2 > value1` **Evaluate** block and select **Boolean** from the dropdown list. ![Dashboard flow - step 2](https://assets.postman.com/postman-docs/v10/flows-tut-db-step2-v10.jpg) 3. Go back to the second **HTTP Request** block and connect an **Evaluate** block to it. In this new **Evaluate** block, change `value1` to `yours` and select `body`. In the FQL window, enter "((yours.close - yours.open) / yours.open) \* 100" to get a percentage of the difference between this stock's open and close price. * Connect this block's **Result** output to the `key` input on the `value2 > value1` block. Flows automatically renames the variable `value2`. ![Dashboard flow - step 3](https://assets.postman.com/postman-docs/v10/flows-tut-db-step3-v10.jpg) 4. Connect the `yours` **Evaluate** block to a new **Display** block and select **Gauge** from the dropdown list. Set the **Gauge** output block's minimum value to `-5` and its maximum value to `5`. Configure the gauge * Connect the `AAPL` **String** block with to a **Display** block and rename the **Display** block `Your ticker`. ![Dashboard flow - step 4](https://assets.postman.com/postman-docs/v10/flows-tut-db-step4-v10.jpg) 5. Go back the third **HTTP Request** block and connect a **Select** block to it. In the **Select** block, select `body.results.values`. Connect an **Evaluate** block to the **Select** block and rename `value1` to `list`. In the FQL window, enter "\$reverse(list)". This arranges the dates in the results in chronological order. * Connect a **For** block to the `$reverse(list)` **Evaluate** block, then connect an **Evaluate** block to the **For** block. In the **Evaluate** block, change `value1` to `item`. In the FQL window, enter "$month(item.timestamp) & '-' & $day(item.timestamp)". This converts timestamps in the results to a readable date format. Connect a **Collect** block to the **Evaluate** block's **Result** output. * Connect another **Evaluate** block to the `$reverse(list)` **Evaluate** block and rename `value1` to `list`. In the FQL window, enter "list.value". ![Dashboard flow - step 5](https://assets.postman.com/postman-docs/v10/flows-tut-db-step5-v10-1.jpg) 6. Create a **List** block and add two **Select** blocks to it. Connect the `list.value` **Evaluate** block to the **List** block's `0` input. Connect the **Collect** block's **List** output to the **List** block's `1` input. Add a List block * Connect the **List** block's output to a **Display** block. select **Line Chart** from the dropdown list and rename the block `Simple moving average`. ![Dashboard flow - step 6](https://assets.postman.com/postman-docs/v10/flows-tut-db-step6-v10-1.jpg) {/* "simple moving average" (SMA) is a term */} {/* vale postman-style-guide.Avoid = NO */} 1. Run the flow and check your dashboard of **Display** blocks. Use it to view your stock ticker, if your stock is outperforming or underperforming the market, and how much it's outperforming or underperforming. You can also view a chart displaying the stock's simple moving average. Run the flow {/* vale postman-style-guide.Avoid = YES */}