RE: power bi - bc report sales and invoices- how do you relate them- no common key on REST data
Hi Tim,
I recommend not using the current API's for Power BI reports.
Because they, usually, are: slow, contain a lot of fields you don't need and don't contain the fields you need. Imho it's much better to use the development environment to create queries for the tables you need in Power BI. Create a star or snowflake schema and filter and aggregate the queries using group-by's.
Also, normally in BC, when a sales order is invoiced (and completely posted) it's deleted, so you can't import it anymore in PBI... If you want to be able to import posted sales orders, you need to archive them in BC and then import from the archive, or manually create an archive. (This might require a code-modification in BC, depending on your localisation.)
Actually, you should have a good understanding on the BC data and process model, before you start to create reports, but it's also very true that there's very little information available in the docs.
I suggest voting for this idea: experience.dynamics.com/.../ ;-)
What exactly do you need to relate? Do you need the Order No on the Invoice, or do you need more? The Order No should be available in the Sales Invoice Header/Line table(s).
Also know that when you use the SIH/L table(s) you will not have the credit memos, returns,... That is why it might be better to use the Customer Ledger Entry table (or other ledger entry tables). It all depends on the requirements for the reports.