Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

FataiSanni

Auto Document Your Power BI Model with INFO.VIEW DAX Functions

Documenting a Power BI semantic model is crucial for ensuring clarity, maintaining consistency, and empowering users to understand the data they are analyzing. Yet, it's a task often relegated to the "I'll do it later" pile because it can be tedious and time-consuming.

What if you could generate a comprehensive, dynamic data dictionary directly inside your Power BI Desktop with just a few lines of DAX? Thanks to the new INFO.VIEW functions, you now can. This article will show you how to automatically document your tables, columns, measures, and relationships, turning your model into a self-documenting system.

FataiSanni_2-1758144339691.png

Why Model Documentation Matters

Before we dive into the how, let's recap the why. A good data dictionary provides a single source of truth for your data model and is essential for :

  • Shared Understanding: It ensures everyone - developers, analysts, and business users - is speaking the same language about metrics and definitions.
  • Trust and Accuracy: It helps stakeholders understand exactly what they are seeing and how to interpret complex, industry-specific metrics correctly.
  • Maintainability: It provides critical context for future you or other developers who need to modify or extend the model.

Introducing the INFO.VIEW DAX Functions

Released in late 2024, the INFO.VIEW functions are a game-changer for Power BI developers. They provide direct, programmatic access to your model's metadata as DAX table functions. The four key functions are:

  1. INFO.VIEW.TABLES(): Lists all tables, their descriptions, storage mode, and whether they are hidden.
  2. INFO.VIEW.COLUMNS(): Details every column, including data type, data category, source name, and DAX expression for calculated columns.
  3. INFO.VIEW.MEASURES(): Provides a list of all measures, including their DAX expressions, format strings, and descriptions.
  4. INFO.VIEW.RELATIONSHIPS(): Shows all relationships, including cardinality, cross-filter direction, and the involved tables/columns.

The best part? These functions output tables, meaning you can use them to create new tables in your data model and build reports about your data.

 

Step-by-Step: Building Your Dynamic Data Dictionary

Let's walk through the process of creating a central data dictionary table.

 

Step 1: Create the Foundation Tables

First, we'll create individual tables for each component of the model. In Power BI Desktop:

  1. Go to the Table view.
  2. Click New table on the 'Table tools' ribbon.
  3. Enter the following DAX expressions one by one:
ModelMeasures = INFO.VIEW.MEASURES()
ModelTables = INFO.VIEW.TABLES()
ModelColumns = INFO.VIEW.COLUMNS()
ModelRelationships = INFO.VIEW.RELATIONSHIPS()

This provides you with four separate tables containing metadata directly from your model.

 

Step 2: The Power of Descriptions

The Description field in these tables is arguably the most valuable. It's your chance to explain the purpose of a measure, column, or table in plain language.

To populate them:

  1. Go to the Model view.
  2. Select a measure, column, or table.
  3. In the Properties pane, find the Description field and add your text.
  4. Refresh the respective metadata table to see the updated description appear.

This step transforms your documentation from a technical schema into a true business glossary .

Step 3: Combine Everything into One Master Table

While four tables are useful, a single, unified data dictionary is even better. We can use a more advanced DAX query to UNION the relevant parts of these tables together.

Create a new table with the following DAX code. This code, inspired by community experts, filters out hidden items and selects the most useful columns for a dictionary :

Data Dictionary = 
VAR __Columns = 
    SELECTCOLUMNS (
        FILTER ( INFO.VIEW.COLUMNS(), [IsHidden] = FALSE() && [Table] <> "Data Dictionary" ),
        "Type", "Column",
        "Name", [Name],
        "Description", [Description],
        "Location", [Table],
        "Expression", [Expression]
    )
VAR __Measures =
    SELECTCOLUMNS (
        FILTER ( INFO.VIEW.MEASURES(), [IsHidden] = FALSE() ),
        "Type", "Measure",
        "Name", [Name],
        "Description", [Description],
        "Location", [Table],
        "Expression", [Expression]
    )
VAR __Tables =
    SELECTCOLUMNS (
        FILTER ( INFO.VIEW.TABLES(), [IsHidden] = FALSE() && [Name] <> "Data Dictionary" ),
        "Type", "Table",
        "Name", [Name],
        "Description", [Description],
        "Location", "N/A",
        "Expression", [Expression]
    )
VAR __Relationships =
    SELECTCOLUMNS (
        INFO.VIEW.RELATIONSHIPS(),
        "Type", "Relationship",
        "Name", [Relationship],
        "Description", BLANK(),
        "Location", "From: " & [FromTable] & " -> To: " & [ToTable],
        "Expression", "N/A"
    )
RETURN
    UNION ( __Columns, __Measures, __Tables, __Relationships )

Step 4: Build the Documentation Report Page

Now for the payoff. Create a new report page called "Data Dictionary" or "Model Documentation."

  1. Add a Table visual and use fields from the new Data Dictionary table: Name, Description, Location, and Expression.
  2. Add a Slicer visual connected to the Type field from the Data Dictionary table.
  3. Format the visuals to make them clear and easy to read.

You now have an interactive, filterable data dictionary living inside your Power BI report. Users can select "Measure" to browse all calculations or "Column" to see all fields and their definitions.

FataiSanni_1-1758143003994.png

 

 

Pro Tip: Exporting Your Documentation

You can easily export this documentation for sharing:

  • Copy from Grid: In Data or Table view, use the Copy button in the ribbon to copy the entire table and paste it into Excel .
  • Connect from Excel: For a refreshable connection, use Excel's Get Data > From Database > SQL Server Analysis Services feature. Paste in your local Power BI instance's server name (found in the Model view's properties) and run your DAX query directly .

Conclusion: Documentation Made Simple

The INFO.VIEW functions have fundamentally changed the way documentation is handled in Power BI. What was once a manual, error-prone chore can now be an automated, dynamic, and integrated part of your development process.

By investing a small amount of time to set up this system, you create a living document that grows and changes with your model, drastically improving its usability and long-term maintainability.

 

Have you tried the new INFO.VIEW functions? How are you handling documentation in your Power BI projects? Share your tips and experiences in the comments below!