Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Odatalink Xero Accounting - Daily view

Hi all,
I am trying to create a daily view for Profit and loss but the endpoint I am using only breaks down to Month, Quarter or Year.
My solution is to input a start and end date paramenter of the same day eg (01/01/2024 & 01/01/2024) and then re run the call for the next day and next day and so on and append into a table.
A bit of help ned though.
Firstly is there a better solution to the one I am considering.
Two, does anyone have an example I can use? or point me to a tutorial that will help.
Thanks
Xero Accounting Endpoint: ProfitAndLossAdvanced - OdataLink

4 REPLIES 4
NE1au
Frequent Visitor

I know this is an old post, but there are 2 approaches you can take with OdataLink.

 

First up, you could perserve using the ProfitAndLoss endpoint but it would probably come at a cost in terms of performance as you would be running 365 calls for each year. If you wantr to continue down this path, you would need a Dates table and Invoke the ProfitAndLoss for each of those dates using the "Add Column \ Invoke Custom Function".

That being said, the approach i would recommend would be to use JournalsAccrual, JournalsCash or JournalsAccrualTable endpoint. Those endpoints provide all debits/credit amounts for a given date range. The first two are in the raw format that Xero provides while the later is a flattened Table format more suitable for Tableau/Azure Data Factory, etc.

 

https://help.odatalink.com/index.php?title=Xero_Accounting_Endpoint:_JournalsAccrual

 

Hope this points you in the right direction.

 

Regards

 

Nic

 

The way to do this is as follows:

1) Reference both endpoints

2) Remove the invoke step from the ProfitAndLoss endpoint

Anonymous
Not applicable

https://drive.google.com/file/d/1mS08cgC65tybihgeG5e48LNZaBJXoaAu/view?usp=sharing 
PBIX file at the above link.

techgs_0-1706488299000.png

Screenshot here - data currently grouped monthly (end of month) trying to get down to the daily level

Hi @Anonymous 

How do you want to get it down to the daily level? Divide the monthly data by the total number of days in a month?

dufoq3
Super User
Super User

Hi, provide sample data and expected result please.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors