[Python] How can I include Department data from Xero's P&L Report in my Python API for Power...

Discussão em 'Python' iniciado por Stack, Maio 22, 2025.

  1. Stack

    Stack Membro Participativo

    I’ve successfully created a working connection from Xero to Power BI using Python to pull the Profit & Loss (P&L) report. Now, I've been asked to include department-level (tracking category) data as well.

    Here’s the issue:

    I can retrieve the P&L broken down by month across 11 periods — but without departments.

    Alternatively, I can get the P&L with departments, but the data is summed for the entire period, not broken down by month.

    What I need is the P&L report broken down by month with department-level detail included. After a lot of trial and error and research, I’m stuck.

    Has anyone been able to achieve this with the Xero API? Any guidance would be appreciated.

    I tried the P&L at first then I added in tracking categories when tracking category = departments. I just can't get it broken down by month and the department showing at the same time. It appears that both month and department show in Header and only 1 header is allowed.

    Continue reading...

Compartilhe esta Página