Example: Building a sheet
This example shows you how to quickly build a sheet. If you want to follow along to replicate the example, the base app and data used are available from the business logic tutorial. For the business logic tutorial, see Tutorial – Customizing how Insight Advisor interprets data.
The sheet edit mode allows you to quickly develop useful visualizations. When you create a sheet, you should have an idea of the kinds of information you want to see. In this case, from the Tutorial - Business logic app we want to create a sheet that lets us exploration sales by different points of time. This sheet should let us see:
-
A geographic representation of sales by country and city.
-
Gross profits by sales office.
-
Employee sales figures.
-
The breakdown of specific products and categories.
-
A filter so users can filter data by year, quarter, month, and week.
Creating the first visualization
For the first visualization, we will make a bar chart initially using the autochart to see a recommendation before changing the recommendation to a bar chart.
Do the following:
-
In the Tutorial - Business logic app, create a new sheet.
-
From Assets, drag and drop SalesOffice under Data as a dimension.
-
From Assets, drag and drop Gross Profit as a Data as a measure.
-
Under Visualization, select Horizontal grouped bar chat.
-
Under Presentation, click Sorting and click By dimension.
Adding a map
With the bar chart made, we can next make a map that visualizes both countries and cities.
Do the following:
-
Click to add another visualization in the row.
-
Under visualization, select Map.
-
Click Open advanced properties.
-
Click Layers > Add layer.
-
Select Area layer.
-
Under Dimensions, click Add and a select Country.
-
Under Colors, select Custom, select By measure, and color by Avg(Sales).
-
Click to return to Layers.
-
Click Add layer and select Point layer.
-
Under Dimensions, click Add and select City.
-
Under Colors, select Custom, select By measure, and color by Sum(Sales).
-
Under Color scheme, select Diverging classes.
Adding a filter pane and rearranging the row
Next, we will add a filter pane so we can explore the data in our visualizations by specific periods of time. We will also rearrange our row of visualizations.
Do the following:
-
Click to add another visualization to the row.
-
Under Visualizations, click and select Filter pane.
-
From Assets, click OrderDate.
-
Drag and drop the following under Data in Properties:
-
Year
-
Quarter
-
Month
-
Week
-
-
On the left side of the filter pane, click and drag on the filter pane to resize it.
-
Click on the map visualization and drag it to the left of the bar chart.
Adding a new row with a table
We will add a new row of visualizations beneath the current row, starting with a table.
Do the following:
-
Click beneath this row to add a visualization in a new row.
-
Under Visualization, select Table.
-
From Assets, drag and drop the following as dimensions:
-
EmployeeName
-
SalesOffice
-
-
From Assets, drag and drop Sales to create the following measures:
-
Avg(Sales)
-
Sum(Sales)
-
-
From Assets, drag and drop Sales onto Filters.
-
Select Condition as the filter type.
-
Select Compare.
-
Under condition, select > and Fixed value.
-
Under Greater than, enter 0.
Adding a treemap
Now, we will add a treemap, so we can explore both our product categories but also the products within those categories.
Do the following:
-
Click to add another visualization to the row.
-
Under Visualization, select Treemap.
-
From Assets, drag and drop CategoryName under Rectangle (Dimensions).
-
From Assets, drag and drop ProductName under Rectangle (Dimensions).
-
From Assets, drag and drop Gross Profits under Size (Measures).
-
On the left side of the filter pane, click and drag on the filter pane to resize it.
Changing measure formatting in advanced options
With the chartscreated, we can move on to some finer adjustments. We will start by changing how sales are displayed in the table.
Do the following:
-
Click Advanced options.
-
Select the table.
-
In the properties panel, click Data.
-
Select Avg Sales
-
Under Number formatting, select Money.
-
Under Format pattern, enter $ #,##0.00;-$ #,##0.00.
-
Select Sum Sales.
-
Under Number formatting, select Money.
-
Under Format pattern, enter $ #,##0.00;-$ #,##0.00.
Changing dimension labels in the filter pane
By default, our filter pane shows the dimension names. We can adjust these to just show the time period rather than the full dimension name.
Do the following:
-
In Advanced options, select the filter pane.
-
Under Data, select OrderDate.autoCalendar.Year.
-
Under Title, enter Year.
-
Under Data, select OrderDate.autoCalendar.Quarter.
-
Under Title, enter Quarter.
-
Under Data, select OrderDate.autoCalendar.Month.
-
Under Title, enter Month.
-
Under Data, select OrderDate.autoCalendar.Week.
-
Under Title, enter Week.