Get Help

PowerBI@2

PowerBI@2 reads data from a Power BI Desktop file (.pbix or .pbip) that is open on the same machine. Nothing to install beyond Power BI Desktop itself.

Connects to

Power BI Desktop — a .pbix or .pbip file open in the Power BI Desktop application on the machine where CAT runs. The provider is meant for interactive testing: you open the file by hand, then test it — before you share it with the rest of your team or with users. For models published to a workspace use Dax@2.

Example

An open file Finance.pbix:

Name
finance model
Technology
Power BI Desktop
Provider
PowerBI@2
Connection string
Finance
Data sources:
- Name: finance model
  Provider: PowerBI@2
  Technology: PowerBIDesktop
  Connection string: Finance

Connection string

Not a driver’s connection string: only the name of the open file, without the .pbix or .pbip extension — the name Power BI Desktop shows in its window title. CAT finds the Analysis Services instance running under the hood, its port and its connection string by itself; you do not need to know that it exists.

Settings

None beyond Connection string — the same key is also accepted under the name File path.

Query

You cannot run SQL against the model; the statement is one DAX query. At least very basic DAX knowledge is required — GUI for DAX queries shows how to build one without it.

A test that verifies the model has data from all states, compared with a source system:

Tests:
- Name: Check all states are loaded
  First Data Source: finance model
  First Query: |
    EVALUATE(
    	VALUES('Customer'[State])
    )
    ORDER BY 'Customer'[State]
  Second data source: accounting # let's say you want to compare with a source system
  Second Query: SELECT [StateName] FROM dbo.States ORDER BY [StateName]
  Expectation: sets match

Prerequisites

Power BI Desktop installed on the machine where CAT runs, with the file open. No driver to install. Windows only — Microsoft does not support Power BI Desktop on Linux.

Limitations

  • Windows only.
  • The file must be open in Power BI Desktop while the tests run; a closed file cannot be tested.
  • Cannot serve lists of definitions — DAX returns column names in square brackets (Tests[Test name], [Test name]), which CAT does not match to property names.

Serving test and data source definitions

PowerBI@2 cannot serve lists of definitions. A DAX query returns its column names in square brackets — Tests[Test name] for a model column, [Test name] for a column the query names itself — and CAT matches definition properties by name, brackets included: [Test name] is not Test name.