Connect Pennylane to Power BI: a step-by-step guide
Pennylane in Power BI: Data Sharing, the v2 API with a tested Power Query script (token, cursor pagination), exports and refresh without a gateway.
Yes, Power BI connects to Pennylane, the French accounting and finance platform, but not the way it connects to Sage 100 or EBP. Pennylane is online software: there is no database on your premises to read. Pennylane opens three doors: Data Sharing, a read-only warehouse that Power BI reads with its Amazon Redshift connector; the API, which Power BI queries with a Power Query script; and exports. The good news: everything happens online, so there is no gateway to install on a server.
This guide covers the three routes, then details the most technical one, the API: the token, the useful endpoints and complete Power Query scripts. We tested them against a test server that reproduces the API from its documentation, with a made-up company and made-up figures. The Pennylane menus are given in English, but your account may show them in French.
Do you really need Power BI?
Let us start there. According to its pricing page, Pennylane already offers analytic reports and a cash forecast in its Essentiel plan, and custom dashboards and accounting reports in its Premium plan. If all your figures live in Pennylane and those screens answer your questions, there is no need for another tool.
Power BI is worth it when:
- you combine Pennylane with other software: a CRM, a till, a stock system, a planning tool, payroll. Margin per project or revenue per salesperson is in none of them on its own;
- you have several companies to follow together: a holding and its subsidiaries, several sites;
- you want your own indicators, always calculated the same way and shared with the team on a single page.
Three ways to link Power BI and Pennylane

KAVDAL diagram based on Pennylane’s documentation (November 2026).
| Method | For whom | Limits |
|---|---|---|
| Data Sharing (the simplest) | Essentiel and Premium plans | Data a few hours behind; credentials to keep secret |
| v2 API and Power Query | Essentiel plan or above, and someone comfortable with Power Query | Scripts to paste (they are below); 25 requests every 5 seconds; a token to renew |
| Exports (FEC, general ledger) | Everyone, for a first test | To redo by hand; the FEC holds accounting only |
Pennylane says so itself: Data Sharing is for analysis and BI tools, the API for automation and integration, with data as fresh as the request but for “small-to-medium” volumes. Third-party tools also sync Pennylane to Power BI: Pennylane’s integrations catalogue lists 44 of them in its reporting category. They are paid, and your data then goes through an intermediary.
Route 1: Data Sharing
This is the route Pennylane documents for Power BI. We could not test it without a Pennylane account: the steps come from Pennylane’s help centre (article of 26 July 2026) and the Data Sharing documentation.
- Turn on sharing. In Pennylane: Settings, Connectivity, Data sharing tab, then Activate. Write down the server, the database, the user name and the password: the password is shown only once. It can take a few hours before the data is available.
- Connect Power BI Desktop. Get data, More…, Database, then Amazon Redshift. Enter the server and the database, then the user name and password. Choose Import mode.
- Pick the tables. In the Navigator, open the pennylane folder, not the
publicfolder that Power BI may offer by default. The useful tables:general_ledger,trial_balance,analytical_ledger,customer_invoices,supplier_invoicesandcompanies.
general_ledger is one of the heaviest tables. The Data Sharing documentation asks you to filter on company_id and date first, or the whole table is read, and to keep only the columns you need. Revenue is calculated as in a trial balance: the accounts (plan_item_number) starting with 70, credit minus debit.
Route 2: the Pennylane API, step by step
1. Create a read-only token
A user with admin access to the company file (executive, internal accountant or external accountant) can create a token, from the Essentiel plan upwards. In Pennylane: Settings, Connectivity, Developers, then generate an API token.
- In the API V2 section, choose read only: Power BI has nothing to write.
- Choose a duration: 1, 6 or 12 months, or unlimited. A limited duration is safer, but put the expiry date in your calendar: the day the token expires, the refresh fails.
- Copy the token straight away: Pennylane shows it only once and does not keep it.
The scopes a dashboard needs, all read-only (:readonly): trial_balance, customer_invoices, customers, ledger_entries, and as needed supplier_invoices and categories. To check what your token holds, the /api/external/v2/me endpoint returns the company and its list of scopes.
2. The endpoints a dashboard needs
They all start with https://app.pennylane.com/api/external/v2/.
| Need | Endpoint | Scope | What to know |
|---|---|---|---|
| Revenue, expenses and profit by month | trial_balance |
trial_balance:readonly |
period_start and period_end required; up to 1,000 accounts per page; debits and credits, no balance |
| Customer invoices and late payments | customer_invoices |
customer_invoices:readonly |
100 per page; status (late, paid…), deadline, remaining_amount_with_tax; drafts included |
| Customer names | customers |
customers:readonly |
The invoice only gives the customer’s ID |
| Supplier invoices | supplier_invoices |
supplier_invoices:readonly |
payment_status, deadline, amount still to pay |
| Entries and analytics | ledger_entry_lines |
ledger_entries:readonly |
100 per page; the account number and the analytic categories, with their weight, on every line |
Three rules apply to all these lists:
- Cursor pagination. Each response contains
items,has_moreandnext_cursor. For the next page, you send that cursor back; on the last page,next_cursorisnull. - The filter on every page. The filter (
filter, a JSON array) is not kept by the cursor: you must send it with every call, or the following pages are no longer filtered. - The rate limit. 25 requests every 5 seconds, per token. Above that, Pennylane answers 429 with the delay to wait; Power Query waits that delay and retries on its own, up to three times.

Calls logged on our test server, which reproduces the API documentation: fictional data.
Be wary of tutorials written before summer 2026: Pennylane changed its API this year. Since 1 July 2026, ledger entries, the trial balance, accounts and journals are paginated by cursor, no longer with page and per_page, and ledger entry IDs have lost their last three digits.
3. Paste the function that reads every page
In Power BI Desktop:
- Transform data, Manage parameters, New parameter: name it
PennylaneToken, type Text, and paste your token as its value. - New source, Blank query, then Advanced editor: paste the function below and name the query
PennylaneList.
// PennylaneList function: reads every page of a Pennylane API v2 list
// path: "customer_invoices", "ledger_entry_lines", "trial_balance"...
// parameters: filter, dates, etc. (optional)
(path as text, optional parameters as nullable record) as list =>
let
BaseQuery = [limit = "100"] & (if parameters = null then [] else parameters),
ReadPage = (nextCursor as nullable text) as record =>
Json.Document(
Web.Contents(
"https://app.pennylane.com", // fixed address: refreshable online
[
RelativePath = "api/external/v2/" & path,
// the filter is sent again with every page: the cursor does not keep it
Query = if nextCursor = null then BaseQuery else BaseQuery & [cursor = nextCursor],
Headers = [Authorization = "Bearer " & PennylaneToken]
]
)
),
Pages = List.Generate(
() => ReadPage(null), // first page, no cursor
(page) => page <> null, // stop after the last page
(page) => if page[has_more] = true then ReadPage(page[next_cursor]) else null,
(page) => page[items] // keep the items of each page
)
in
List.Combine(Pages)
Three choices matter in this code:
- The address stays fixed. The part that changes goes through
RelativePathandQuery. Microsoft says so: a “dynamic” data source, whose address is calculated, cannot be refreshed in the Power BI service, except precisely with these twoWeb.Contentsoptions. List.Generateloops whilehas_moreis true, and every call sends the cursor back with the same parameters, filter included.- The token comes from the parameter, in the
Authorizationheader. Microsoft advises against writing a secret key in M code, but its “Web API” credential can only pass a key in the URL, while Pennylane expects it in the header. The token therefore remains readable by anyone who opens the .pbix file: do not share that file, and keep this token for Power BI only.
The first time, Power BI asks how to connect to https://app.pennylane.com: choose Anonymous. The token, sent in the header, is what identifies you.
4. Add the dashboard queries
Each query calls the function. First, customer invoices without drafts:
// Customer invoices issued since 1 January 2025, without drafts
let
Filter = "[{""field"":""date"",""operator"":""gteq"",""value"":""2025-01-01""}]",
Rows = PennylaneList("customer_invoices", [filter = Filter]),
Columns = {"id", "invoice_number", "date", "deadline", "currency_amount_before_tax",
"remaining_amount_with_tax", "status", "draft", "customer"},
Raw = Table.FromRecords(Rows, Columns, MissingField.UseNull),
NoDrafts = Table.SelectRows(Raw, each [draft] = false),
Customer = Table.ExpandRecordColumn(NoDrafts, "customer", {"id"}, {"customer_id"}),
// amounts arrive as text with a decimal point: read them with the "en-US" culture
Types = Table.TransformColumnTypes(Customer, {
{"date", type date}, {"deadline", type date}, {"customer_id", Int64.Type},
{"currency_amount_before_tax", type number}, {"remaining_amount_with_tax", type number}}, "en-US")
in
Types

Result on our test server, fictional data.
Amounts arrive as text, with a decimal point ("1200.50"). Hence the "en-US" culture in the conversion: without it, a Power BI set to French or another European locale may misread these numbers.
Customer names, to link customer_id to a name:
// Customer names, to link invoices (customer_id) to a name
let
Rows = PennylaneList("customers"),
Raw = Table.FromRecords(Rows, {"id", "name"}, MissingField.UseNull)
in
Raw
Revenue and expenses for each month, from the trial balance:
// Trial balance of each month since January 2025: one call per month, up to 1,000 accounts per page
let
Months = List.Generate(
() => #date(2025, 1, 1),
(m) => m <= Date.StartOfMonth(DateTime.Date(DateTime.LocalNow())),
(m) => Date.AddMonths(m, 1)),
OneMonth = (start as date) as table =>
let
Rows = PennylaneList("trial_balance", [
period_start = Date.ToText(start, [Format = "yyyy-MM-dd"]),
period_end = Date.ToText(Date.EndOfMonth(start), [Format = "yyyy-MM-dd"]),
limit = "1000"]),
Raw = Table.FromRecords(Rows, {"number", "label", "debits", "credits"}, MissingField.UseNull)
in
Table.AddColumn(Raw, "month", each start, type date),
All = Table.Combine(List.Transform(Months, OneMonth)),
Types = Table.TransformColumnTypes(All, {{"debits", type number}, {"credits", type number}}, "en-US"),
// income (class 7): credit - debit; expenses (class 6): debit - credit
Amount = Table.AddColumn(Types, "amount",
each if Text.StartsWith([number], "7") then [credits] - [debits] else [debits] - [credits], type number)
in
Amount
The trial balance gives each account’s debits and credits for the period, not its balance: the amount column puts the sign the right way round. In the French chart of accounts, revenue is the sum of the accounts starting with 70; profit is income (class 7) minus expenses (class 6).
Finally, revenue by analytic category, from the entry lines:
// Revenue by analytic category, from the entry lines of accounts 70
let
Filter = "[{""field"":""date"",""operator"":""gteq"",""value"":""2025-01-01""}]",
Rows = PennylaneList("ledger_entry_lines", [filter = Filter]),
Raw = Table.FromRecords(Rows, {"id", "date", "debit", "credit", "ledger_account", "categories"}, MissingField.UseNull),
Account = Table.ExpandRecordColumn(Raw, "ledger_account", {"number"}, {"account"}),
Sales = Table.SelectRows(Account, each Text.StartsWith([account], "70")),
// a line can be split across several categories, each with its weight
ByCategory = Table.ExpandListColumn(Sales, "categories"),
Category = Table.ExpandRecordColumn(ByCategory, "categories",
{"label", "weight", "category_group"}, {"category", "weight", "group"}),
// several analytic axes? then filter on a single group_id
Group = Table.ExpandRecordColumn(Category, "group", {"id"}, {"group_id"}),
Types = Table.TransformColumnTypes(Group, {
{"date", type date}, {"debit", type number}, {"credit", type number}, {"weight", type number}}, "en-US"),
Amount = Table.AddColumn(Types, "amount_excl_vat",
each ([credit] - [debit]) * (if [weight] = null then 1 else [weight]), type number)
in
Amount
We checked the syntax of these queries with Microsoft’s Power Query parser, and their logic on our test server: 542 invoices read in 6 calls with no duplicates, 22 monthly trial balances, 3,377 entry lines in 35 calls, including one 429 response followed by a successful retry, and the same revenue in the trial balance and in the analytics. We have not run them on a real Pennylane company: make a first test on one month, and compare the result with the trial balance shown in Pennylane.
The resulting dashboard
With these queries, accounting, invoices and analytics fit on a single page.

Sample dashboard built by KAVDAL on our test server: fictional data.
In this example, revenue grows 5.1% over ten months, but profit falls from €96,151 to €25,598: salaries and social charges rose 13.6%, much faster than sales. Training is down 21.8% while consulting is up 19.5%. And out of €103,475 of overdue invoices, €62,464 are more than 60 days late: one customer, Domaine des Sources, has paid none of its summer invoices. Three decisions to make, which no single screen showed together.
Your numbers up to date every morning, combined from your software: a first dashboard from €1,500.VAT not applicable, art. 293 B of the French Tax Code.
Publishing and refreshing without a gateway
Power BI Desktop is enough to build the dashboard. To publish it and keep it up to date without thinking about it:
- No gateway. Pennylane is online, and Microsoft states that a cloud data source needs no gateway when the Power BI service can connect to it directly. In the semantic model settings, enter the source credentials: the Data Sharing user name and password (route 1), or Anonymous for
https://app.pennylane.com(route 2). If the route 2 connection test fails, tick Skip test connection. - A licence to share. Power BI Desktop is free. To publish and share, each person who views the report needs a Pro licence, at €12.10 excl. VAT per user per month paid yearly, according to Microsoft’s French pricing page accessed on 8 November 2026. A Pro licence allows up to 8 scheduled refreshes a day.
- Refresh time. A refresh must finish within two hours. With 100 lines per page and 25 requests every 5 seconds, reading 10,000 entry lines takes at least 20 seconds: load only the years you need.

Screenshot: Microsoft, Power BI documentation (learn.microsoft.com), licensed CC BY 4.0, unmodified.
Power BI pauses the refresh after two months without visits, and disables it after four failures in a row. An expired Pennylane token makes every refresh fail: renew it before its date, then update the PennylaneToken parameter.
Route 3: exports, for a first test
Without a token or Data Sharing, files remain. The FEC (fichier des écritures comptables, the French standard audit file) holds every accounting entry in a format set by the French tax administration; your accountant can also provide it. Power BI reads it with the Text/CSV connector. It is perfect for testing a dashboard idea, but the export has to be redone at every update, and the FEC holds accounting only: no invoice status, no analytic categories.
The API can also produce these files (the FEC, the general ledger as an Excel file), but in two steps: you request the export, then fetch a link valid for 30 minutes. That is useful for archiving, not for an automatic refresh.
Traps that distort the numbers
- Drafts. The customer invoice list includes drafts (
draftistrue): leave them out, they are not revenue yet. - Credit notes. They are in the same list, with the
credit_notestatus: check their sign on a few documents before adding them up. - VAT and currencies.
remaining_amount_with_taxincludes VAT;currency_amount_before_taxexcludes it, but in the invoice currency. If you invoice in other currencies, convert withexchange_rate, or start from the trial balance. - A trial balance without balances.
trial_balancegives debits and credits: put the sign back according to the account class. For a balance sheet amount (bank, customers), the period must start at the opening of the financial year: compare the result with the balance shown in Pennylane. - Analytics counted twice. A line can be split across several categories (the
weight), and each analytic axis is a group: filter on a singlegroup_id, or amounts add up. - The forgotten filter. If you write your own loop, send
filterandsortwith every page. On our test server, forgetting the filter from the second page onwards, the query read 542 invoices instead of 227. - One token for everything. The 25-requests-every-5-seconds limit applies to the token, all uses combined: keep one token for Power BI and another for your automations.
- Several companies. A company token sees only one company: create one token per company, then append the queries with a “Company” column. Data Sharing follows your Pennylane permissions and can return several companies: then filter on
company_id.
Would you rather we did it?
Connecting Pennylane is the technical part. The real work is choosing the few numbers you act on, combining them with your other software, and checking they match your accounts to the cent. KAVDAL builds these dashboards for small and mid-sized businesses: a first dashboard from €1,500, net price (VAT not applicable, art. 293 B of the French Tax Code), read-only on your Pennylane, and you own the result. You can also browse our sample dashboards, open without a form. We work remotely across France, and on site in Toulouse and Lyon.
Sources
- Pennylane, “Create a Company API Token” (developer docs, updated 30/01/2026): admin access, Essential plan or above, Settings > Connectivity > Developers, read-only or read and write, 1, 6 or 12 months or unlimited, token shown only once — accessed 8 Nov 2026
- Pennylane, “Understand Scopes” (updated 31/03/2026): read-only scopes by domain (customer_invoices, ledger_entries, trial_balance, categories…) — accessed 8 Nov 2026
- Pennylane, “Use Cursor-Based Pagination” (updated 03/06/2026): cursor, limit, has_more, next_cursor; the cursor does not keep the filter — accessed 8 Nov 2026
- Pennylane, “Rate Limiting in API v2” (updated 06/02/2026): 25 requests every 5 seconds per token, 429 response with a retry-after header — accessed 8 Nov 2026
- Pennylane, “2026 API changes Migration Guide” (updated 20/03/2026): cursor pagination for ledger entries, trial balance, accounts and journals, old behaviour removed on 1 July 2026 — accessed 8 Nov 2026
- Pennylane, API reference, “List customer invoices”: up to 100 invoices per page, status, deadline, draft and remaining_amount_with_tax fields, amounts as text — accessed 8 Nov 2026
- Pennylane, API reference, “Get the trial balance”: period_start and period_end required, up to 1,000 accounts per page, debits and credits — accessed 8 Nov 2026
- Pennylane, API reference, “List ledger entry lines”: account number and weighted analytic categories on every line — accessed 8 Nov 2026
- Pennylane, API reference, “Retrieve a FEC export”: two-step export, download link valid for 30 minutes — accessed 8 Nov 2026
- Pennylane, “Data Sharing or API: Which Should You Use?” (updated 03/12/2025): read-only Data Sharing a few hours behind, real-time API for small to medium volumes — accessed 8 Nov 2026
- Pennylane, help centre, “Intégrer vos données Pennylane dans Microsoft Power BI” (26/07/2026): Essentiel and Premium plans, Amazon Redshift connector, pennylane schema, recommended tables — accessed 8 Nov 2026
- Pennylane, Data Sharing documentation, “Getting started” and the general_ledger table: credentials shown once, filter on company_id and date, quotas — accessed 8 Nov 2026
- Pennylane, “Tarifs” (pricing) page: Essentiel plan with API and integrations, analytic reports and cash forecast; Premium plan with custom dashboards and accounting reports — accessed 8 Nov 2026
- Pennylane, integrations catalogue, reporting category: 44 tools, including Power BI — accessed 8 Nov 2026
- BOFiP (French tax administration), BOI-CF-IOR-60-40-20, “Format du fichier des écritures comptables” (FEC) — accessed 8 Nov 2026
- Microsoft Learn, “Web.Contents” (updated 03/04/2026): RelativePath, Query and Headers options; the API key of a “Web API” credential goes only in the URL — accessed 8 Nov 2026
- Microsoft Learn, “Handle status codes by using Web.Contents” (13/07/2026): automatic retry on 429, up to three times, honouring Retry-After — accessed 8 Nov 2026
- Microsoft Learn, “Data refresh in Power BI” (18/09/2026): dynamic data sources not refreshable except with RelativePath and Query, cloud sources without a gateway, two hours at most on shared capacity — accessed 8 Nov 2026
- Microsoft Learn, “Configure scheduled refresh”: 8 refreshes a day with Pro, paused after two months without visits, disabled after four failures — accessed 8 Nov 2026
- Microsoft Learn, Power Query “Amazon Redshift” connector (25/09/2026): Import and DirectQuery modes — accessed 8 Nov 2026
- Microsoft, “Power BI pricing” page (France): Power BI Desktop free; Pro €12.10 excl. VAT per user per month, paid yearly — accessed 8 Nov 2026
- Microsoft, open-source Power Query parser (@microsoft/powerquery-parser 5.0.0), used to check the syntax of the queries — accessed 8 Nov 2026
Your numbers up to date every morning, combined from your software: a first dashboard from €1,500.VAT not applicable, art. 293 B of the French Tax Code.