Daily DAX : Day 447 INFO.VIEW.COLUMNS

Power BI DAX Function: INFO.VIEW.COLUMNS()

INFO.VIEW.COLUMNS() is a DAX table function that returns a table containing metadata about all columns in the current Power BI semantic model.

Description

This function provides detailed information on each column, including:

  • Table: The name of the table the column belongs to.
  • Name: The column name.
  • Description: Any description added to the column.
  • Expression: The DAX formula if it's a calculated column (blank for regular columns).
  • DataCategory: Category like "Time", "Image", etc.
  • DataType: The data type of the column.
  • IsHidden: Whether the column is hidden.
  • And other metadata fields.

It uses friendly names (e.g., table and column names instead of IDs) and is designed for ease of use compared to the base INFO.COLUMNS() function.

Syntax

INFO.VIEW.COLUMNS()

No parameters. Returns a table.

Restrictions

  • Requires write permissions on the semantic model.
  • Cannot be used in live-connected models in Power BI Desktop.
  • Updates automatically on model refresh.

Use Cases

The primary use is self-documentation of the semantic model:

  • Create calculated tables to list all columns and their properties.
  • Build a documentation report page showing model structure.
  • Help new developers understand columns, calculated formulas, data types, etc.
  • Combine with other INFO.VIEW functions (TABLES, MEASURES, RELATIONSHIPS) for full model metadata.

Examples

1. Basic Query (in DAX Query View)

EVALUATE INFO.VIEW.COLUMNS()

Returns the full table of all columns.

2. Filtered and Selected Columns

EVALUATE
SELECTCOLUMNS(
    FILTER(
        INFO.VIEW.COLUMNS(),
        [DataCategory] <> "RowNumber" && [Table] <> "xTables"
    ),
    "Table", [Table],
    "Column", [Name],
    "Description", [Description],
    "DAX Formula", [Expression],
    "Data Category", [DataCategory],
    "Data Type", [DataType],
    "Is Hidden", [IsHidden]
)
ORDER BY [Table], [Column]

3. As a Calculated Table (for self-documentation)

Create a new table in Power BI Desktop:

Model Columns Documentation =
SELECTCOLUMNS(
    INFO.VIEW.COLUMNS(),
    "Table Name", [Table],
    "Column Name", [Name],
    "Description", [Description],
    "Expression", [Expression],
    "Data Type", [DataType],
    "Hidden", [IsHidden]
)

This table will automatically update with model changes and can be visualized in reports.


Comments