Skip to main content

Power BI Template Tutorial

In this tutorial you will re-create the Explorer report (see below) from the sample Power BI template that is included with VIM Enterprise. The Explorer report is designed to show all of the physical elements in a project. For example, you can view elements grouped by category, get counts of individual elements, and view groups of elements or individual elements in the WebGL Viewer.

At any stage during this procedure, you can compare the current state of your report with the existing Explorer report. This will enable you to see how a typical report page is created and explore some of the features and settings in Power BI.

See Power BI Basics for a brief overview of Power BI and the features used to create the Explorer report. For more detailed information on creating reports, refer to the Microsoft Power BI Online Help

Power BI Report view

Prerequisites

Step 1: Create and Configure a New Report Page

In this section you will create a new report page, define a custom size for the canvas, add a background image, title, and navigation button. Background images can be used to include a company logo—see the image below, which contains the VIM logo as a banner—or to add style to your report.

To use the sample background image below for this procedure, right-click on the image and choose Save Image As.

Power BI Report view

Create a New Page

  1. Click the New page icon (green square with "+") at the bottom right of the Power BI window. The new page is given a default name: Page 1.
  2. Click-and-drag the new page tab to the left until it is immediately beside the Existing Explorer page. This will make it easier to compare the page your are creating with the existing Explorer page. NOTE: You might have to do this using repeated actions due to a limitation in the current version of Power BI.
  3. Right-click on the new page tab at the bottom right of the Visualizations panel and choose Rename. Type Explorer Tutorial and press Enter. The new name appears on the page tab.
  4. On the Visualizations pane, expand Canvas Settings, click on the Type drop-down list and choose Custom. In the Height field, type 1088. In the Width field, type 1936. The matrix visual is resized on the canvas.
  5. On the Visualizations pane, expand Canvas background. In the Image field click Browse, choose a jpeg image and click Open. The background image is added to the canvas. NOTE: JPEG images used for the background can include things like a company banner and should match the canvas size in the sample template (in this case, 1088 x 1936). Larger images can be used, but should have an aspect ratio of 16:9. Smaller images or images with different aspect ratios will be stretched or condensed to fit within the canvas, and images and text might be blurred or distorted.

Add a Title

  1. On the Power BI ribbon, click on Insert. In the Elements section, click Text box. A new text box is added to the matrix visual and the Format text box pane is displayed on the right.
  2. On the Format text box pane, expand Properties to define the size and position of the visual on the canvas:
    • Under Size, set the Height to 64 and the Width to 448.
    • Expand Position and set the Horizontal value to 744 and the Vertical value to 0.
    • Expand Padding and set the top value to 16.
  3. On the Format text box pane, turn Title off. Expand Effects and set Background, Visual Border, and Shadow to Off.
  4. Click inside the text box. Set the Font to Roboto, Calibri, Arial, sans serif and the Font Size to 18. Set the Font Color to White, click Bold, and click the Center alignment option. Type Explorer. The text is added to the text box using the specified font settings.

Add a Navigation Button

In this section you will add a link from the Explorer page to the About page in the sample Power BI template. You can use navigation buttons to link to other pages in a report, move forward or backward sequentially, or link to external web pages.

  1. On the Power BI ribbon, click on Insert. In the Elements section, click on the Buttons drop-down and choose Information. A button is added to the canvas. Click on the button visual to select it.
  2. On the Format button pane, under Button, expand Action. From the Type drop-down menu, choose Page Navigation. From the Destination drop-down menu, choose the About page.
  3. On the General panel, expand Properties to define the size and position of the visual on the canvas:
    • Under Size, set the Height to 64 and the Width to 64.
    • Expand Position and set the Horizontal value to 1872 and the Vertical value to 0.
  4. On the General panel, expand Style and then expand Icon. Set the Line color to White and the Weight to 4.

Step 2: Add the Element Category Matrix

Elements are the central component of the VIM Data Model and include physical items such as stairs, walls, and floors, but also include non-physical items such as materials, levels, and rooms. Using a matrix, as opposed to a table, enables you to create a tree view displaying the element hierarchy. This particular matrix is central to the Explorer report page and displays a count of all physical project elements based on the Category Tag and then further categorized by the Category Name, Family, Type, and Revit ID.

Add Data to the Matrix

Matrix Add Data
  1. On the Visualizations pane, click the Matrix icon. A new, unformatted matrix visual is added to the canvas. Click on the new matrix visual to select it.
  2. Assign the following tables from the Data panel to the specified fields on the Visualizations > Build Visual panel:
    • Expand the Element table, click on _key and drag it to the Values field (see image above). A Count of _key column is added to the matrix, with a total count of 8690 unique elements. On the Visualizations panel, under Values, click the drop-down menu beside Count of _key. Note that Count (Distinct) is selected for the _key table. If, for example, you select Average instead of Count (Distinct), the value in the matrix is updated to show the average value from the table.
    • Expand the Element > Referenced Data table, click on Category_Tag and drag it to the Rows field. A Category_Tag column is added to the matrix, displaying the 5 category tags in the table: Conceptual, Group, Link, Physical, Physical-Extra. If you want to see the types of data in the Referenced Data table, you can select it on the Data pane and switch to Table view.
    • Expand the Element > Referenced Data table, click on Category.NameFull and drag it to the Rows field, below Category_Tag. Each of the main Category_Tag rows in bold text can now be expanded to display the category names. For example, if you expand the Physical category, you will see rows for each of the different physical categories, such as Ceilings, Doors, and Walls. Note that the order of the Rows you add on the Visualizations pane determines the overall hierarchy within the matrix. For example, if you reverse the Row order by dragging Category.NameFull above Category_Tag, the hierarchy is reversed.
    • Expand the Element > Referenced Data table, click on Family.Name and drag it to the Rows field, below Category.NameFull. A third level is added to the matrix visual, listing the family names for each category. Note that when you add data to a Power BI visual, the data type is also added automatically to the Filters pane.
    • From the Element table, click on Element.Name and drag it to the Rows field, below Family.Name. A fourth level is added to the matrix visual, listing the element names for each family.
    • From the Element table, click on Element.RevitID and drag it to the Rows field, below Element.Name. A fifth level is added to the matrix visual, listing the Revit IDs for each element.

Customize the Display

  1. At the top of the Visualizations pane, click Format visual.
  2. Under Visual > Specific column, turn Apply to header on. Expand the Values section, and click the Right alignment option. The Count of _key column header is right-aligned in the matrix visual.
  3. Under Visual > Cell Elements, turn Background color on and then click the Conditional formatting (fx) button. Under Minimum, click the color drop-down list and select the lightest shade of blue (#9bd3eb). Under Maximum, click the color drop-down list and select the medium shade of blue (#37a6d6). Click OK. In the matrix visual, the colors in the Count of _key column are updated to show the range of values.
  4. On the Visualizations pane, click Format Visual, and then click on the General panel to define the size and position of the visual on the canvas:
    • Expand Properties. Under Size, set the Height to 632 and the Width to 512.
    • Expand Position and set the Horizontal value to 16 and the Vertical value to 440.
  5. On the Format Visual > General panel, turn Title off. The gray line at the top of the matrix is removed.
  6. On the Visualizations pane, click Build visual. Under Rows, double-click on Category_Tag, change the text to Category Tag > Category > Family > Type > Revit ID and press Enter. The column header is updated in the matrix visual.
  7. Under Values, double-click on Count of _key, change the text to Count and press Enter. The column header is updated.

The completed element category matrix should look similar to the image below.

Element category matrix

Step 3: Add the WebGL Viewer

The WebGL Viewer is included with the sample Power BI template as a custom visual and is pre-configured to display 3D mesh data and interact with Power BI visuals such as tables and matrices.

WebGL Viewer

Add Data to the WebGL Viewer

  1. On the Visualizations pane, on the Build Visual panel, click the VIM Viewer custom visual icon. The WebGL Viewer is added to the Power BI canvas as a custom visual.
  2. Assign the following tables from the Data panel to the corresponding field on the Visualizations > Build Visual panel:
    • Expand the Element table, click on Element.Index and drag it to the Element[Element.Index] field (see below).
    • Expand the VIM table, click on URL and drag it to the VIM[URL] Field.
    • Expand the Geometry-Node table, click on Node.Index and drag it to the Geometry-Node[Node.Index] field.
    • In the Geometry-Node table, click on Geometry and drag it to the Geometry-Node[Geometry] field. WebGL Tables

Customize the Display

  1. With the WebGL Viewer still selected on the canvas, on the Visualizations pane, click Format Visual.
  2. On the Visual panel, expand Viewer and set Can Select to Off. This disables the selection of objects within the viewer.
  3. Expand UI. Under Panels, make sure only Loading Box is turned On. This displays the progress indicator when loading VIM files from the specified URL.
  4. Under the Axes, Cursors, and Settings sections, make sure all options are turned Off. Under Tools, make sure only Sectioning Mode is turned On. The Sectioning Mode tool is added near the bottom of the WebGL Viewer.
  5. On the Visual panel, set Context to On. When set to On, ghost view is enabled when viewing selected objects.
  6. On the Visual panel, set Outlines to On and select Changed from the Mode drop-down menu. Objects will be outlined in light blue whenever the the set of visible objects has changed in the viewer, for example if an element is selected within a matrix.
  7. On the General panel, expand Properties. Expand Position and set Horizontal to 544 and Vertical to 80. Under Size, set the Height to 991 and the Width to 904.
  8. On the General panel, set Title to Off. The title bar is removed from the Viewer

Step 4: Add the Family Parameters Matrix

The Family Parameters matrix displays a list of Revit IDs categorized by the Family (e.g., Constraints, Identity Data) and then further categorized by the Parameter Name (e.g., Host, Omniclass Number), and then the corresponding Parameter Value.

Family Parameters matrix

Add Data to the Matrix

  1. On the Visualizations pane, click the Matrix icon. A new matrix visual is added to the canvas. Click on the new matrix visual to select it.
  2. Assign the following tables from the Data panel to the specified fields on the Visualizations > Build Visual panel:
    • Expand the Family-Parameter > CaseSensitivity table, click on Parameter_DisplayValue.CaseSensitivity.Original and drag it to the Values field. A new column is added to the matrix and labelled as First Parameter_DisplayValue.CaseSensitivity.Original ("First" is the default sorting method for the data type). No data is displayed at this point because no columns have been added.
    • Expand the Element table, click on Element.RevitID and drag it to the Rows field. The Element.RevitID column is added to the matrix visual. The OmniClass Number, where available, is added to the Values column because it is the first value available linked to the Revit ID in the data model.
    • Expand the Family-Parameter > Parameter Descriptor table, click on Descriptor_Group and drag it to the Rows field, below Element.RevitID. A second level is added to the matrix visual, displaying the family categorie groups (e.g., Constraints, Identity Data) and parameter values for each Revit ID.
    • Expand the Family-Parameter > Parameter Descriptor table, click on Descriptor_Name.CaseSensitivity.Original and drag it to the Rows field, below Descriptor_Group. A third level is added to the tree view, displaying the family names (e.g., Host, Omniclass Number) and the parameter values.

Customize the Display

  1. At the top of the Visualizations pane, click Format visual. On the Visual panel, set Row subtotals to Off. Parameter values are removed from the family category rows.
  2. On the Visualizations pane, click Format Visual, and then click on the General panel to define the size and position of the visual on the canvas:
    • Expand Properties. Under Size, set the Height to 320 and the Width to 456.
    • Expand Position and set the Horizontal value to 1464 and the Vertical value to 80.
  3. On the Visualizations pane, click Format visual, and then click on the General panel. Expand Title and type Family Parameters in the Text box. The title is added to the matrix visual.
  4. On the Visualizations pane, click Build visual. Under Rows, double-click on Element.RevitId, change the text to Revit ID > Group > Parameter and press Enter. The column header is updated in the matrix visual to reflect the hierachy of the matrix tree view.
  5. On the Build visual panel, under Values, double-click on First Parameter_DisplayValue.CaseSensitivity.Original, change the text to Value and press Enter. The column header is updated in the matrix visual.
  6. Manually resize the columns by clicking the right side of a column and dragging to the left or right. You might have to use the bottom scrollbar in the matrix visual to resize the right column.

Step 5: Add the Type Parameters Matrix

Similar to the Family Parameters matrix, the Type Parameters matrix displays a list of Revit IDs categorized by the Type (e.g., Analytical Properties) and then further categorized by the Parameter Name (e.g., Analytic Construction), and then the corresponding Parameter Value.

Type Parameters matrix

Add Data to the Matrix

  1. On the Visualizations pane, click the Matrix icon. A new matrix visual is added to the canvas. Click on the new matrix visual to select it.
  2. Assign the following tables from the Data panel to the specified fields on the Visualizations > Build Visual panel:
    • Expand the FamilyType-Parameter > CaseSensitivity table, click on Parameter_DisplayValue.CaseSensitivity.Original and drag it to the Values field. A new column is added to the matrix and labelled as First Parameter_DisplayValue.CaseSensitivity.Original ("First" is the default sorting method for the data type). No data is displayed at this point because no columns have been added.
    • Expand the Element table, click on Element.RevitID and drag it to the Rows field. The Element.RevitID column is added to the matrix.
    • Expand the FamilyType-Parameter > Parameter Descriptor table, click on Descriptor_Group and drag it to the Rows field, below Element.RevitID. A second level is added to the matrix visual, displaying the type categories (e.g., Analytical Properties, Construction).
    • Expand the FamilyType-Parameter > Parameter Descriptor table, click on Descriptor_Name.CaseSensitivity.Original and drag it to the Rows field, below Descriptor_Group. A third level is added to the tree view, displaying the type parameter names for each category (e.g., Analytic Construction, Construction Type Id) and the parameter values.

Customize the Display

  1. On the Visualizations pane, on the Format visual panel, turn off Column subtotals and Row subtotals.
  2. On the Visualizations pane, click Format Visual, and then click on the General panel to define the size and position of the visual on the canvas:
    • Expand Properties. Under Size, set the Height to 320 and the Width to 456.
    • Expand Position and set the Horizontal value to 1464 and the Vertical value to 416.
  3. At the top of the Visualizations pane, click Format visual and then click on the General panel. Expand Title and type Type Parameters in the Text box. The title is added to the matrix visual.
  4. On the Visualizations pane, click Build visual. Under Rows, double-click on Element.RevitId, change the text to Revit ID > Group > Parameter and press Enter. The column header is updated in the matrix visual to reflect the hierachy of the matrix tree view.
  5. On the Build visual panel, under Values, double-click on First Parameter_DisplayValue.CaseSensitivity.Original, change the text to Value and press Enter. The column header is updated in the matrix.
  6. Manually resize the columns by clicking the right side of a column and dragging to the left or right. You might have to use the bottom scrollbar to resize the right column.

Step 6: Add the Instance Parameters Matrix

Similar to the Type Parameters matrix, the Instance Parameters matrix displays a list of Revit IDs categorized by the Instance (e.g., Dimensions) and then further categorized by the Parameter Name (e.g., Arch Offset from Face), and then the corresponding Parameter Value.

Instance Parameters matrix

Add Data to the Matrix

  1. On the Visualizations pane, click the Matrix icon. A new matrix visual is added to the canvas. Click on the new matrix visual to select it.
  2. Assign the following tables from the Data panel to the specified fields on the Visualizations > Build Visual panel:
    • Expand the FamilyInstance-Parameter > CaseSensitivity table, click on Parameter_DisplayValue.CaseSensitivity.Original and drag it to the Values field. A new column is added to the matrix and labelled as First Parameter_DisplayValue.CaseSensitivity.Original ("First" is the default sorting method for the data type). No data is displayed at this point because no columns have been added.
    • Expand the Element table, click on Element.RevitID and drag it to the Rows field. The Element.RevitID column is added to the matrix, and values (where available) are added to the other column.
    • Expand the FamilyInstance-Parameter > Parameter Descriptor table, click on Descriptor_Group and drag it to the Rows field, below Element.RevitID. A second level is added to the matrix visual, displaying the Instance categories.
    • Expand the FamilyInstance-Parameter > Parameter Descriptor table, click on Descriptor_Name.CaseSensitivity.Original and drag it to the Rows field, below Descriptor_Group. A third level is added to the tree view, displaying the instance parameter names for each category (e.g., Identity Data, Other ) and the parameter values.

Customize the Display

  1. On the Visualizations pane, click Format visual. On the Visual panel, turn off Column subtotals and Row subtotals.
  2. On the Visualizations pane, click Format Visual, and then click on the General panel to define the size and position of the visual on the canvas:
    • Expand Properties. Under Size, set the Height to 320 and the Width to 456.
    • Expand Position and set the Horizontal value to 1464 and the Vertical value to 752.
  3. At the top of the Visualizations pane, click Format visual, and then click on the General panel. Expand Title and type Instance Parameters in the Text box. The column header is updated in the matrix visual to reflect the hierachy of the matrix tree view.
  4. On the Visualizations pane, click Build visual. Under Rows, double-click on Element.RevitId, change the text to Revit ID > Group > Parameter and press Enter. The column header is updated in the matrix visual.
  5. On the Build visual panel, under Values, double-click on First Parameter_DisplayValue.CaseSensitivity.Original, change the text to Value and press Enter. The column header is updated in the matrix visual.
  6. Manually resize the columns by clicking the right side of a column and dragging to the left or right. You might have to use the bottom scrollbar to resize the right column.

Step 7: Add the Model & Workset Slicer

Slicers provide an easily-accessible method of filtering visuals on a report page based on common or important criteria. The slicers used for the Explorer report page use a simple drop-down list with checkboxes for each option. If no options are selected (the default state), then all options are selected. The Model & Workset slicer enables you to filter the visuals on the report page based on the different Revit project files and worksets used with the sample Snowdon Towers project.

Model & Workset slicer

Add Data to the Slicer

  1. On the Visualizations pane, click the Slicer icon. A new slicer visual is added to the canvas.
  2. Assign the following tables from the Data panel to the specified fields on the Visualizations > Build Visual panel:
    • Expand the BimDocument > File table, click on File_Name and drag it to the Field box. A checkbox list of Revit project files is added to the slicer.
    • Expand the Element > Referenced Data table, click on Workset.Name and drag it to the Field box, below File_Name. A second level is added to the slicer, displaying the available worksets. Note that this project only has one workset named Workset1.

Customize the Display

  1. With the slicer visual still selected on the canvas, on the Visualizations pane, click Format Visual. On the Visual panel, expand Slicer Settings and choose Dropdown from the Style list. The list of project files is changed to a drop-down checkbox list in the slicer visual.
  2. On the Visualizations pane, click on the General panel and expand Properties. Under Size, set the Height to 120 and the Width to 512. Expand Position and set the Horizontal value to 16 and the Vertical value to 80. The slicer is resized and repositioned on the canvas.
  3. On the General panel, expand Title and type Model & Workset in the Text field.

Step 8: Add the Category Name Slicer

The Category Name slicer enables you to filter the visuals on the report page based on Revit Categories, for example, Doors, Walls, and Windows.

Category Name slicer

Add Data to the Slicer

  1. On the Visualizations pane, click the Slicer icon. A new slicer visual is added to the canvas.
  2. On the Data pane, expand the Category table, click on Name_Full and drag it to the Field box on the Visualizations pane. A checkbox list of category names is added to the slicer visual.

Customize the Display

  1. With the slicer visual still selected on the canvas, click the Format Your Visual button at the top-center of the Visualizations pane. On the Visual panel, expand Slicer Settings and choose Dropdown from the Style list. The list of project files is changed to a drop-down checkbox list in the slicer visual.
  2. On the Visualizations pane, click on the General panel and turn Title off.
  3. On the Visualizations pane, click on the General panel and expand Properties. Under Size, set the Height to 96 and the Width to 512. Expand Position and set the Horizontal value to 16 and the Vertical value to 216. The slicer is resized and repositioned on the canvas.
  4. On the Visual panel, turn on Slicer Header. Expand Slicer Header, and type Category Name in the Title text field.

Step 9: Add the Family Slicer

The Family slicer enables you to filter the visuals on the report page based on Revit Families, for example, Floor, Railing, and Shelving.

Family slicer

Add Data to the Slicer

  1. On the Visualizations pane, click the Slicer icon. A new slicer visual is added to the canvas.
  2. On the Data pane, expand the Element > Referenced Data table, click on Family.Name and drag it to the Field box on the Visualizations pane. A checkbox list of element family names is added to the slicer visual.

Customize the Display

  1. With the slicer visual still selected on the canvas, click the Format Your Visual button at the top-center of the Visualizations pane. On the Visual panel, expand Slicer Settings and choose Dropdown from the Style list. The list of project files is changed to a drop-down checkbox list in the slicer visual.
  2. On the Visualizations pane, click on the General panel and turn Title off.
  3. On the Visualizations pane, click on the General panel and expand Properties. Under Size, set the Height to 96 and the Width to 512. Expand Position and set the Horizontal value to 16 and the Vertical value to 328. The slicer is resized and repositioned on the canvas.
  4. On the Visual panel, turn on Slicer Header. Expand Slicer Header, and type Category Name in the Title text field.