Exercise – Create a sales forecasting template

Completed

In this exercise, you'll apply your learned knowledge to create an Excel template that presents sales forecasting to colleagues.

Scenario

You work at a bicycle retail chain and are responsible for your organization's Dataverse environment.

The finance department manager requests that you create a spreadsheet that contains sales forecast information, which the manager includes in an investment business plan. The values must be presented in a column-type graph with values summarized by months for the estimated revenues of the customers. A view on the customer's current revenues is also required.

Prepare Dataverse

For this exercise, you'll need to create a sales forecasting table to use as the data source for the spreadsheet.

The objective of this module focuses on templates, so to accelerate the next steps, you can download a file that contains the tables that will help you proceed.

Follow these steps in a Dataverse environment where you can proceed with the import of a solution, such as a dedicated training or development environment:

  1. Sign in to the Power Apps portal.

  2. In the left pane, select Solutions. In the list of solutions, select Import solution.

    Screenshot of the Power Apps portal left navigation pane, showing the Solutions and Import solution options.

  3. In the Import a solution form, select Browse to find the location of the solution zip file. Select Next to proceed to the next step.

    Screenshot of the Import a solution form, highlighting the Browse and Next options.

  4. Select Import to confirm the process of the file.

    Screenshot of the Import a solution form, highlighting the Import option.

When the solution import process is complete, a notification message should appear in Power Apps.

To ensure that all customizations are applied in the environment, select the newly imported solution and then Publish all customizations.

Screenshot of the Power Apps portal, showing the Publish all customizations menu.

Prepare data

Next, you're going to need some data to your table. Here's some sample data you can input:

Customer Company Name Actual Sales Actual Sales Updated Date Estimated Revenues Estimated Revenue Target Date
Adatum Corporation 50000000 2022-12-01 150000000 2023-03-01
Adventure Works Cycles 25000000 2022-12-01 250000000 2022-12-30
Alpine Ski House 15000000 2022-12-01 32500000 2023-01-15
Bellows College 5360000 2022-12-01 2780000 2023-01-15

Alternatively, if you're a little more experienced in importing data, you can download this data as a comma-separated values (CSV) file. (For more information, see Import from an Excel or CSV file.)

Create a spreadsheet template

You've created the sales forecast table and have added records to it. Now, you can create the spreadsheet template.

  1. In the imported solution, go to the MS Learn - Word Templates - Exercise 5 model-driven app and then select Play.

    Screenshot of the Power Apps portal, showing the selected model-driven app and the Play menu.

  2. For the Active MS Learn Sales Forecast view, select the Excel Templates dropdown menu and then Download Template. Depending on your browser window size, you may need to select the ellipsis first to find the dropdown menu.

    Screenshot of a sample model-driven app, displaying a list of active sales forecasts and showing the Download Template option of the Excel Templates menu.

  3. In the Download Template form, select Edit Columns to remove fields that aren't required in the Excel spreadsheet.

    Screenshot of the Download Template form, highlighting the Edit Columns option.

  4. In the list of columns, clear the Name checkbox. Select Download to proceed to the next step.

    Screenshot of the Download Template form. Focus is on the cleared Name checkbox and on the Download option.

  5. Open the file that's downloaded in your computer. Save it with a name that will clearly identify the template after it's been uploaded back into Dataverse, such as Sales Forecast Template.xlsx. You may be prompted to Enable editing, go ahead and do that.

    Screenshot of the Excel Template spreadsheet. Focus is on the name of the template.

  6. Records are listed as a data table. The first step to display the estimated revenues by month in a graph is to select the Insert tab, select the PivotTable dropdown, and choose From Table/Range.

    Screenshot of the Excel Template spreadsheet. Focus is on the From Table/Range option under PivotTable for the Insert menu.

  7. By default, the current table is set as the Table/Range value. Select OK to proceed with the creation of the PivotTable.

    Screenshot of the PivotTable from table or range form. Focus is on the OK option.

  8. In the newly created worksheet, set up the PivotTable columns to display monthly estimated revenues by customers and format these columns to be type Currency.

    Screenshot of the Excel template spreadsheet with focus on the formatted money value fields and the PivotTable configuration.

  9. To create the requested graph, select the PivotTable Analyze tab and then PivotChart. under the Column category, select the Clustered Column chart type. Select OK to proceed to the next step.

    Screenshot of the Excel template spreadsheet. Focus is on the Clustered Column chart type and the OK option.

  10. Resize and move the generated graph over the table. (It isn't required to display the PivotTable.)

    Screenshot of the generated graph in the Excel template spreadsheet.

  11. The next request from the finance department manager is to list the customers with their actual sales. Repeat Step 6 with the original table selected, then select the Insert tab, select the PivotTable dropdown, and choose From Table/Range. This time, select the Existing Worksheet option to place the PivotTable next to the graph.

    Screenshot of the PivotTable from table or range form. Focus on the Existing Worksheet and OK options.

  12. In the worksheet where the graph and new PivotTable are located, set up the PivotTable columns to display actual sales by customers and format these columns to be type Currency.

    Screenshot of the Excel template spreadsheet. Focus is on the formatted money value fields and the PivotTable configuration.

  13. To update Dataverse with the new template, save the file, then select the Excel Templates menu for the applicable view, and choose Upload Template.

    Screenshot of a sample model-driven app. Focus is on the Upload Template option of Excel Templates menu option.

  14. Select the Excel template file and then select Upload to proceed.

    Screenshot of the Select file to upload as a template form and the Choose File and Upload options.

  15. To test the template, modify the sales forecast records with other values. With the intended view selected for the forecast, select the Excel Templates menu, and under the Personal Excel Templates section, select Sales Forecast Template.

    Screenshot of the uploaded template option that's available in the Personal Excel Templates section of the Excel Templates menu.

  16. When you open the generated spreadsheet, the graph and PivotTables may not be updated with the new values. Select the Data tab, then select Refresh All. Alternatively, you can set up the document to automatically refresh the data when you open it by following these instructions.

    Screenshot of the Excel document with focus on the Refresh All menu option.

Next steps

You've now learned how to create an Excel template based on a Dataverse table view, which allows you to present this data by using the full analysis and presentation features of Excel. Next, you'll validate the learned concepts for this module.