---
title: "PowerBI@2"
description: "PowerBI@2 — a Power BI Desktop file open on the same machine, queried in DAX, no driver needed"
url: "https://docs.justcat.it/reference/data-sources/providers/powerbi-2/"
---
# PowerBI@2


## 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](https://docs.justcat.it/reference/data-sources/providers/dax-2/ "Dax@2").

## Example

An open file `Finance.pbix`:


**Properties**



Name
: finance model

Provider
: PowerBI@2

Technology
: PowerBIDesktop

Connection string
: Finance





**YAML**


```yaml
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](https://docs.justcat.it/how-to-guides/data-platforms/power-bi/get-the-dax-query-behind-a-visual/ "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:

```yaml
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](https://docs.justcat.it/reference/project-file/lists/ "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`.

## Related

* [Technologies](https://docs.justcat.it/reference/data-sources/technologies/ "Technologies").
* [Test Power BI](https://docs.justcat.it/how-to-guides/data-platforms/power-bi/test-power-bi/ "Test Power BI") — testing a local file and a workspace model, step by step.
* [GUI for DAX queries](https://docs.justcat.it/how-to-guides/data-platforms/power-bi/get-the-dax-query-behind-a-visual/ "GUI for DAX queries") and [DAX introduction](https://docs.justcat.it/how-to-guides/data-platforms/power-bi/sql-to-dax/ "DAX introduction") — getting started with DAX.

