Skip to main content

Upgrading Revit Power BI Reports to VIM SQL v5.6.0.c

This guide covers how to upgrade a customized Revit Power BI report for compatibility with VIM SQL v5.6.0.c.

Read this before you start

1. The steps below assume your custom report is based on the template:

BimAudit-RVT-SQL5.6.0-U5.1.0-DM0.14.0.pbix

2. The order of the steps below is important. Deviating from this order may break the connections between the semantic model and the report pages.

Need help?

If you need help upgrading, please give us a shout!

Initial Setupโ€‹

  1. Create a backup of your customized Power BI report.

  2. If you have not already done so, install VIM Enterprise v1.2.141.17 or later.

    If you are targeting Revit projects from ACC, please ensure your ACC app bundles are correctly updated before running your VIM Enterprise projects.

  3. Open the new Revit template which targets "VIM SQL v5.6.0.c" in one instance of Power BI Desktop:

    BimAudit-RVT-SQL5.6.0.c-U5.1.0-DM0.15.0.pbix
  4. Run your VIM Enterprise Revit or ACC project to update the project's database to VIM SQL v5.6.0.c.

  5. Open your customized Revit report in another instance of Power BI Desktop.

  6. Ensure your report's data source is set to the newly updated database via "Transform Data" > "Data source settings"

  7. Press "Apply changes" to load the data from your newly updated database.

Model View Tablesโ€‹

  1. In the left navigation bar, click on Model View.

  2. In the right table list, rename the following tables.


    Previous Table NameNew Table Name
    FamilyInstance-Parameter๐Ÿ‘‰Element-Parameter
    Instance-Workset๐Ÿ‘‰Workset
    Instance-Level๐Ÿ‘‰Level
    Element-PhaseFilter๐Ÿ‘‰PhaseFilter
    Element-Room๐Ÿ‘‰Room
    Element-View๐Ÿ‘‰View
    Element-CompoundStructure๐Ÿ‘‰FamilyType-CompoundStructure
    Instance-LevelReferences๐Ÿ‘‰Element-Level-Info
    UI-SpecialCharacter๐Ÿ‘‰SpecialCharacter-UI
  3. Delete the following tables as they are no longer required.


    Table Name to Delete
    Element-Level-ElevationโŒ
    Material-NodeโŒ
    Instance-RoomโŒ
  4. Click on the measure "UI-FieldParameter-Model-Workset-ElevationLevel-RoomNumberName-Group-GroupRevitID" and replace "'Instance-Room'[Number Name]" with "'Room'[Number Name]"

  5. Save your changes.

Transform Data Updatesโ€‹

  1. Click on Transform Data

  2. Rename the top "Primary" group folder to "Core"

  3. Rename the "Other Tables" group folder to "Helpers"

  4. Click and drag your tables to re-order them in the following manner. This ordering will help with the instructions below.


    Core/
    VIM
    BimDocument
    Element
    Element-Hierarchy
    Element-Geometry
    Element-Parameter
    FamilyType
    FamilyType-Parameter
    FamilyType-CompoundStructure
    Family
    Family-Parameter
    Category
    Group
    Room
    Level
    Element-Level-Info
    Element-In-System
    Element-In-Warning
    Material-In-Element
    View
    ViewSheet
    View-In-ViewSheet
    ViewSheetSet
    View-In-ViewSheetSet
    ViewSheet-In-ViewSheetSet
    Workset
    Phases
    PhaseFilter
    Unit
    __EFMigrationHistory
    Element-Join

    Helpers/
    Element-BasePoint
    BuiltInCategoryMap
    Category-Discipline
    Camera
    CompoundStructureLayer
    DisplayUnit
    Family-OmniClass
    FamilyType-Uniformat
    Material-Join
    SpecialCharacter-Family
    SpecialCharacter-FamilyType
    SpecialCharacter-Material
    SpecialCharacter-UI
    System
    Warning
    WarningType
    INT-Warnings

    PromotedParameters/
    <empty>

    Not Loaded/
    AreaScheme
    BimDocument-PhaseOrder
    CompoundStructure
    Element-Area
    Element-BimDocument
    Element-DesignOption
    Element-Grid
    Element-Group
    Element-Level
    Element-Material
    Element-Phase
    Element-PhaseFilter-Parameter
    Element-Base
    Geometry
    Geometry-Node
    Instance-Group
    Instance-Level-Unique
    Instance-Room-1
    Level-Reference
    Node
    Phase
    Unique Instance Host
    Other Queries
    MeasureTable
  5. Add the new table Element-Measure-Info

    • Right-click on the Core group folder > New Query > Blank query

    • Right-click on the new blank query > Rename > Set its name to "Element-Measure-Info"

    • Select the table and press "Advanced Editor".

    • Set the table definition to the following, replacing the Sql.Database fields with your data source.

      let
      Source = Sql.Database("__your_server_name__", "__your_database_name__"),
      dbo_ElementMeasureInfo = Source{[Schema = "dbo", Item = "ElementMeasureInfo"]}[Data]
      in
      dbo_ElementMeasureInfo
  6. Add the new table Element-Ifc-Info

    • Right-click on the Core group folder > New Query > Blank query

    • Right-click on the new blank query > Rename > Set its name to "Element-Ifc-Info"

    • Select the table and press "Advanced Editor".

    • Set the table definition to the following, replacing the Sql.Database fields with your data source.

      let
      Source = Sql.Database("__your_server_name__", "__your_database_name__"),
      dbo_ElementIfcInfo = Source{[Schema = "dbo", Item = "ElementIfcInfo"]}[Data]
      in
      dbo_ElementIfcInfo
  7. Add the new table LevelInfo

    • Right-click on the Helpers folder > New Query > Blank query

    • Right-click on the new blank query > Rename > Set its name to "LevelInfo"

    • Select the table then press "Advanced Editor".

    • Set the table definition to the following, replacing the Sql.Database fields with your data source.

      let
      Source = Sql.Database("__your_server_name__", "__your_database_name__"),),
      dbo_LevelInfo = Source{[Schema = "dbo", Item = "LevelInfo"]}[Data]
      in
      dbo_LevelInfo
  8. Rename the following tables


    Group FolderPrevious Table NameNew Table Name
    HelpersMaterial-Join๐Ÿ‘‰Material
    HelpersElement-BasePoint๐Ÿ‘‰BasePoint
    HelpersINT-Warnings๐Ÿ‘‰WarningsCustomized
  9. For each table below, copy the "Advanced Editor" table definition from the new Revit template (BimAudit-RVT-SQL5.6.0.c-U5.1.0-DM0.15.0.pbix) which is opened in a separate Power BI Desktop instance.


    when you are copying...
    • Replace the text value "localhost\SQLExpress" with your database server name.

    • Replace the text value "vim-empty-v5.6.0.c" with your database name.

    Group FolderTable NameNotes
    CoreElement๐Ÿ”นSource updated to "vw_Element_v4"
    CoreElement-Parameter๐Ÿ”นSource updated to "vw_Parameter_v3"
    CoreFamilyType-Parameter๐Ÿ”นSource updated to "vw_FamilyParameter_v3"
    CoreFamily-CompoundStructure๐ŸงนNow joins with the "Element" table instead of "Element-Base"
    CoreFamily-Parameter๐Ÿ”นSource updated to "vw_FamilyParameter_v3"
    CoreCategory๐Ÿ”นThe column "NameFull" has been added for convenience, which joins the parent category name with the current category name.
    CoreGroup๐ŸงนSimplified table definition. Now joins with the "Element" table instead of "Element-Base"
    CoreRoom๐ŸงนSimplified table definition. Now joins with the "Element" table instead of "Element-Base"
    CoreLevel๐Ÿ”นJoins with the new LevelInfo table for additional information
    CoreElement-Level-Info๐Ÿ”นDefines the primary level of each element as well as the geometry containment between building stories
    CoreElement-In-System๐ŸงนNow joins with the "Element" table instead of "Element-Base"
    CoreElement-In-Warning๐ŸงนNow joins with the "Element" table instead of "Element-Base"
    CoreMaterial-In-Element๐ŸงนNow joins with the "Material" table
    CoreView๐ŸงนNow joins with the "Element" table instead of "Element-Base"
    CoreSystem๐ŸงนNow joins with the "Element" table instead of "Element-Base"
  10. Delete the tables below as they are no longer required.


    Group FolderTable Name
    CoreElement-JoinโŒ
    Not LoadedElement-AreaโŒ
    Not LoadedAreaSchemeโŒ
    Not LoadedElement-PhaseโŒ
    Not LoadedBimDocument-PhaseOrderโŒ
    Not LoadedCompoundStructureโŒ
    Not LoadedElement-BimDocumentโŒ
    Not LoadedElement-DesignOptionโŒ
    Not LoadedElement-GridโŒ
    Not LoadedElement-GroupโŒ
    Not LoadedElement-LevelโŒ
    Not LoadedElement-MaterialโŒ
    Not LoadedElement-PhaseFilter-ParameterโŒ
    Not LoadedGeometryโŒ
    Not LoadedGeometry-NodeโŒ
    Not LoadedInstance-GroupโŒ
    Not LoadedInstance-Level-UniqueโŒ
    Not LoadedInstance-Room-1โŒ
    Not LoadedLevel-ReferenceโŒ
    Not LoadedNodeโŒ
    Not LoadedPhaseโŒ
    Not LoadedUnique Instance HostโŒ
    Not LoadedElement-BaseโŒ
  11. Delete the Not Loaded group folder.

  12. Save your changes and select "Apply Later"

  13. Press Close & Apply

  14. When the "Set storage mode" dialog appears for the tables "Element-Measure-Info", "Element-Ifc-Info", and "LevelInfo", select "Import" and press OK.

Model View Connectionsโ€‹

  1. Open the Model View once again to modify the table connections.

  2. Right-click on the connection between "Element" and "Level" and press "delete"

  3. Right-click on the connection between "Element" and "Element-Level-Info" and press "delete"

  4. Click and drag the "Element-Level-Info" > "Element" field onto the "Element" > "_key" field to create a relationship

    • Set the "Cardinality" to "One to one (1:1)"
    • Set the "Cross-filter direction" to "Both"
    • Enable "Make this relationship active"
    • Press "Save"
  5. Click and drag the "Element-Level-Info" > "PrimaryLevel" field onto the "Level" > "_key" field to create a relationship

    • Set the "Cardinality" to "Many to one (*:1)"
    • Set the "Cross-filter direction" to "Both"
    • Enable "Make this relationship active"
    • Press "Save"
  6. Click and drag the "LevelInfo" > "Level" field onto the "Level" > "_key" field to create a relationship

    • Set the "Cardinality" to "One to one (1:1)"
    • Set the "Cross-filter direction" to "Both"
    • Enable "Make this relationship active"
    • Press "Save"
  7. Click and drag the "Group" > "Group-Element._key" field onto the "Element" > "_key" field to create a relationship

    • Set the "Cardinality" to "One to one (1:1)"
    • Set the "Cross-filter direction" to "Both"
    • Enable "Make this relationship active"
    • Press "Save"
  8. Click and drag the "Element-Measure-Info" > "Element" field onto the "Element" > "_key" field to create a relationship

    • Set the "Cardinality" to "One to one (1:1)"
    • Set the "Cross-filter direction" to "Both"
    • Enable "Make this relationship active"
    • Press "Save"
  9. Click and drag the "Element-Ifc-Info" > "Element" field onto the "Element" > "_key" field to create a relationship

    • Set the "Cardinality" to "One to one (1:1)"
    • Set the "Cross-filter direction" to "Both"
    • Enable "Make this relationship active"
    • Press "Save"
  10. Update the measure "Level" > Story Above to:

    Story Above = 
    VAR CurrentElevation = 'Level'[Elevation]
    VAR CurrentFile = 'Level'[Building]
    RETURN
    CALCULATE(
    MINX(
    FILTER(
    ALL('Level'),
    'Level'[IsBuildingStory] &&
    'Level'[Elevation] > CurrentElevation &&
    'Level'[Building] = CurrentFile
    ),
    'Level'[Level.Name]
    )
    )
  11. Delete the measure "Level" > Elevation - Story Above

  12. Select the measure "UI-FieldParameter-Model-CategoryTag-Workset-Level-Category"

    • Set line 5 to
      ("Level", NAMEOF('Level'[NameWithElevationFeetDecimal]), 3),
    • Press the check button to accept your changes.
  13. Select the measure "UI-FieldParameter-Model-Workset-Level-Category"

    • Set line 4 to
      ("Level", NAMEOF('Level'[NameWithElevationFeetDecimal]), 2),
    • Press the check button to accept your changes.
  14. Select the measure "Ul-FieldParameter-Model-Workset-ElevationLevel-RoomNumberName-Group-GroupRevitID"

    • Set line 4 to
      ("Level", NAMEOF('Level'[NameWithElevationFeetDecimal]), 2),
    • Press the check button to accept your changes.
  15. Update the measures under "MeasureTable" > "Parameter Template" to match the template's revised definitions.

  16. Save your changes

Report Pagesโ€‹

  1. Open the Report view

  2. Cycle through the report pages to update each one. Use the provided Power BI report template to identify the fields which need to be updated and copy the settings over.


    note

    If some widgets do not correctly update after modifying their settings, try deleting them and re-creating them.

  3. Copy the contents of the newly added report pages into your customized report, if desired:

    • "Element - Measure"
    • "Levels - Elevations"
    • "Levels - Elements"
  4. Save your changes and validate that everything is working well.

Still stumped?

If things didn't go to plan, please reach out!