Get Help

PowerBI@1

PowerBI@1 reads data from a Power BI Desktop file (.pbix) that is open on the same machine. Needs the MSOLAP driver.

Connects to

Power BI Desktop — a .pbix 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. Legacy providers have no technology of their own — use the technology of the replacement, PowerBI@2.

Example

An open file Finance.pbix:

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

Connection string

Not a driver’s connection string: only the name of the open file, without the .pbix 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.

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, and the MSOLAP driver from Microsoft: https://learn.microsoft.com/en-us/analysis-services/client-libraries?view=asallproducts-allversions#windows-installer. Download and install MSOLAP (amd64):

MS OLAP driver

The link leads to an .msi file; install it with Next, Next, Next… Windows only.

Limitations

  • Windows only — Microsoft does not support Power BI Desktop on Linux, and the MSOLAP driver has no Linux build.
  • 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@1 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.