Dax Function: INFO.VIEW.TABLES

Category: INFO Functions

The INFO.VIEW.TABLES function in Power BI is a Data Analysis Expressions (DAX) function designed to retrieve metadata about all the tables within a Power BI data model. It provides a comprehensive view of the tables in a report, including details such as table names and associated properties.

Purpose

The function’s primary purpose is to facilitate the exploration and management of the data model by providing metadata about the tables. It is especially useful for documentation, debugging, or dynamically generating reports that adapt to schema changes.

Type of Calculations It Performs

  • Retrieves metadata information, such as table names and attributes.

  • Returns a non-calculative output that describes the structure of the data model.

  • Helps in identifying hidden, inactive, or unused tables.

Practical Use Cases

  • Dynamic Reporting: Automatically adjust visuals or reports to reflect the available tables.

  • Data Model Validation: Ensure consistency and correctness by reviewing table metadata.

  • Documentation: Generate an up-to-date schema of the data model for stakeholders.

  • Debugging: Analyze table attributes during the development or troubleshooting process.


INFO.VIEW.TABLES()

The INFO.VIEW.TABLES function does not require any parameters.

How Does INFO.VIEW.TABLES Dax Works

  1. Metadata Query: When invoked, the function queries the data model to gather metadata about the tables.

  2. Result Compilation: It compiles a table containing rows, each representing a table in the model and columns detailing the metadata attributes.

Example Formula

INFO.VIEW.TABLES()

This will output a table like:

Table NameIs HiddenRow CountIs Calculated
SalesFalse10,000False
ProductsFalse200False
TempCalcTrueN/ATrue
 

What Does It Return?

The function returns a table containing metadata about all the tables in the model, including:

  • Table Name: Name of each table.

  • Is Hidden: Boolean indicating if the table is hidden from the report view.

  • Row Count: Number of rows in each table (if available).

  • Other Metadata: Additional properties, such as whether the table is calculated or a direct query.

When Should We Use It?

  • During the development phase of a Power BI report to understand the model structure.

  • For auditing purposes to identify hidden or unused tables.

  • When automating schema documentation.

Examples

Basic Usage :

Retrieve the list of all tables:


INFO.VIEW.TABLES()

Output:

Table NameIs Hidden
OrdersFalse
CustomersFalse
TempTableTrue

Column Usage

Using the output to filter hidden tables:


FILTER(INFO.VIEW.TABLES(), [Is Hidden] = TRUE)

Advanced Usage

Combine with other DAX functions to create dynamic lists or validations:


COUNTROWS(FILTER(INFO.VIEW.TABLES(), [Row Count] > 1000))

This returns the count of tables with more than 1,000 rows.

Tips and Tricks

  • Use filters to target specific attributes like hidden or calculated tables.

  • Combine with functions like INFO.VIEW.COLUMNS for a detailed schema analysis.

  • Use this function in conjunction with measures to build automated schema dashboards.

Potential Pitfalls

  • Can be computationally intensive for large models with many tables.

  • Limited in direct visualization; consider exporting results for better analysis.

Performance Impact of INFO.VIEW.TABLES DAX Function:

  • Efficient for small to medium-sized models.

  • Avoid using in real-time visuals for large or complex datasets due to potential performance lag.

Related Functions You Might Need

Want to Learn More?
For more information, check out the official Microsoft documentation for INFO.VIEW.TABLES You can also experiment with this function in your Power BI reports to explore its capabilities.

Unlock the full capabilities of Power BI and elevate your data insights with our specialized consulting services. Whether you need guidance on advanced DAX functions like those highlighted here, support in designing interactive dashboards, or expertise in optimizing data models for enhanced performance, our experienced Power BI consultants are equipped to deliver customized solutions for your business. Explore our Power BI Consulting Services page to discover how we can help your organization make smarter, data-driven decisions.

1. What is the INFO.VIEW.TABLES function used for?

It retrieves metadata about all tables in a Power BI data model.

2. Does the function require parameters?

No, the INFO.VIEW.TABLES function does not require any parameters.

3. What type of data does it return?

It returns a table containing metadata such as table names, visibility, and row counts.

4. Can it identify hidden tables?

Yes, it includes a column indicating whether a table is hidden.

5. Is this function resource-intensive?

It can be for very large models. Use filters to optimize performance.