PHPackages                             chrisbeaver/powerbi-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. chrisbeaver/powerbi-php

ActiveLibrary

chrisbeaver/powerbi-php
=======================

PowerBI API Wrapper for PHP

v0.3(6y ago)112MITPHPPHP &gt;=7.1.0CI failing

Since Mar 21Pushed 6y ago1 watchersCompare

[ Source](https://github.com/chrisbeaver/powerbi-php)[ Packagist](https://packagist.org/packages/chrisbeaver/powerbi-php)[ RSS](/packages/chrisbeaver-powerbi-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

powerbi-php
===========

[](#powerbi-php)

[![Build Status](https://camo.githubusercontent.com/2f72825ae301d5814e8e388bbd7a487bb8a1c9197be5ba99651d091b7be57169/68747470733a2f2f7472617669732d63692e636f6d2f63687269736265617665722f706f77657262692d7068702e7376673f746f6b656e3d36734e454775747a55654b5a69486e7170455276266272616e63683d6d6173746572)](https://travis-ci.com/chrisbeaver/powerbi-php)

Usage
-----

[](#usage)

1. To prepare a dataset on PowerBI, use the Resources provided to design the dataset and tables.

`$dataSet = Beaver\PowerBI\Resources\DataSet\DataSet::create('Testing Database from API');`

With the dataset created, we can now create tables to add to it.

```
use Beaver\PowerBI\Resources\DataSet\Table;
use Beaver\PowerBI\Resources\DataSet\Type;

$table1 = Table::create('person')
    ->addColumn('name', Type::STRING)
    ->addColumn('birthday', Type::DATETIME)
    ->addColumn('age', Type::INTEGER);

$table2 = Table::create('account')
    ->addColumn('amount', Type::DOUBLE)
    ->addColumn('last_deposit', Type::DATETIME);

```

Now we have a dataset and tables, we just need to assign the tables to the dataset.

`$dataSet->addTable($table1)->addTable($table2);`

With everything built, time to put it on the server.

---

2. Submit the dataset to the server.

First build the HTTP client.

`$client = new Beaver\PowerBI\Http\Client($client_id, $client_secret, $username, $password);`

Now use the client to post the dataset to the server and get our response.

`$response = $client->dataSet()->create($dataSet);`

We get back a response array from the server, and in this array we can get the PowerBI UUID assigned to the dataset so we can then add rows of data to it.

`$dataSetID = $response['id'];`

Next we can add some data to the schema we designed using the tables and columns. Here we'll just create some rows of data for the account table.

```
$rows1 = [
    ['amount' => 300.50, 'last_deposit' => '09/10/2012'],
    ['amount' => 212.12, 'last_deposit' => '09/07/2019'],
];

$rows2 = [
    ['amount' => 99.50, 'last_deposit' => '01/23/2017'],
    ['amount' => 10.00, 'last_deposit' => '01/29/2015'],
];

```

This demo is just preparing two different requests for entering data to the `account` table we created before. Always use an array of rows. With our client already established, we use this to make additional requests to the server for adding our data.

```
$client->dataSet()->addRows($dataSetID, 'account', $rows1);
$client->dataSet()->addRows($dataSetID, 'account', $rows2);

```

We now have a dataset with data populated in it on the PowerBI server ready for designing reports.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

3

Last Release

2219d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6531553fa89581a8329240a559e7adde088825b8337fe1e2b9acc7e9a376db4?d=identicon)[chrisbeaver](/maintainers/chrisbeaver)

---

Top Contributors

[![chrisbeaver](https://avatars.githubusercontent.com/u/5077917?v=4)](https://github.com/chrisbeaver "chrisbeaver (23 commits)")

---

Tags

powerbipowerbi-php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chrisbeaver-powerbi-php/health.svg)

```
[![Health](https://phpackages.com/badges/chrisbeaver-powerbi-php/health.svg)](https://phpackages.com/packages/chrisbeaver-powerbi-php)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
