Forum Discussion
Odatalink Xero Accounting - Daily view
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