It's actually very simple.
Start with the salesInvoices and then expand the salesInvoiceLines column:
let
Source = _apis,
#"Filtered Rows" = Table.SelectRows(Source, each ([apiName] = "salesInvoices")),
#"Expanded Data.1" = Table.ExpandTableColumn(#"Filtered Rows", "Data.1", {"id", "number", "externalDocumentNumber", "invoiceDate", "postingDate", "dueDate", "customerPurchaseOrderReference", "customerId", "customerNumber", "customerName", "billToName", "billToCustomerId", "billToCustomerNumber", "shipToName", "shipToContact", "sellToAddressLine1", "sellToAddressLine2", "sellToCity", "sellToCountry", "sellToState", "sellToPostCode", "billToAddressLine1", "billToAddressLine2", "billToCity", "billToCountry", "billToState", "billToPostCode", "shipToAddressLine1", "shipToAddressLine2", "shipToCity", "shipToCountry", "shipToState", "shipToPostCode", "currencyId", "shortcutDimension1Code", "shortcutDimension2Code", "currencyCode", "orderId", "orderNumber", "paymentTermsId", "shipmentMethodId", "salesperson", "pricesIncludeTax", "remainingAmount", "discountAmount", "discountAppliedBeforeTax", "totalAmountExcludingTax", "totalTaxAmount", "totalAmountIncludingTax", "status", "lastModifiedDateTime", "phoneNumber", "email", "customer", "countryRegion", "currency", "dimensionValue", "paymentTerm", "shipmentMethod", "dimensionSetLines", "salesInvoiceLines", "pdfDocument", "attachments", "ETag"}, {"id", "number", "externalDocumentNumber", "invoiceDate", "postingDate", "dueDate", "customerPurchaseOrderReference", "customerId", "customerNumber", "customerName", "billToName", "billToCustomerId", "billToCustomerNumber", "shipToName", "shipToContact", "sellToAddressLine1", "sellToAddressLine2", "sellToCity", "sellToCountry", "sellToState", "sellToPostCode", "billToAddressLine1", "billToAddressLine2", "billToCity", "billToCountry", "billToState", "billToPostCode", "shipToAddressLine1", "shipToAddressLine2", "shipToCity", "shipToCountry", "shipToState", "shipToPostCode", "currencyId", "shortcutDimension1Code", "shortcutDimension2Code", "currencyCode", "orderId", "orderNumber", "paymentTermsId", "shipmentMethodId", "salesperson", "pricesIncludeTax", "remainingAmount", "discountAmount", "discountAppliedBeforeTax", "totalAmountExcludingTax", "totalTaxAmount", "totalAmountIncludingTax", "status", "lastModifiedDateTime", "phoneNumber", "email", "customer", "countryRegion", "currency", "dimensionValue", "paymentTerm", "shipmentMethod", "dimensionSetLines", "salesInvoiceLines", "pdfDocument", "attachments", "ETag"}),
#"Expanded salesInvoiceLines" = Table.ExpandTableColumn(#"Expanded Data.1", "salesInvoiceLines", {"id", "documentId", "sequence", "itemId", "accountId", "lineType", "lineObjectNumber", "description", "unitOfMeasureId", "unitOfMeasureCode", "unitPrice", "quantity", "discountAmount", "discountPercent", "discountAppliedBeforeTax", "amountExcludingTax", "taxCode", "taxPercent", "totalTaxAmount", "amountIncludingTax", "invoiceDiscountAllocation", "netAmount", "netTaxAmount", "netAmountIncludingTax", "shipmentDate", "itemVariantId", "locationId", "salesInvoice", "item", "account", "unitOfMeasure", "itemVariant", "dimensionSetLines", "location"}, {"id.1", "documentId", "sequence", "itemId", "accountId", "lineType", "lineObjectNumber", "description", "unitOfMeasureId", "unitOfMeasureCode", "unitPrice", "quantity", "discountAmount.1", "discountPercent", "discountAppliedBeforeTax.1", "amountExcludingTax", "taxCode", "taxPercent", "totalTaxAmount.1", "amountIncludingTax", "invoiceDiscountAllocation", "netAmount", "netTaxAmount", "netAmountIncludingTax", "shipmentDate", "itemVariantId", "locationId", "salesInvoice", "item", "account", "unitOfMeasure", "itemVariant", "dimensionSetLines.1", "location"})
in
#"Expanded salesInvoiceLines"
An example is in attachment.
[View:/cfs-file/__key/communityserver-discussions-components-files/758/SalesInvoicesAndLines.pbix:320:240]
You might want to remove all unneeded columns.
Here's also a post with some explanations:
Did you know that the Business Central connector in Power BI supports related tables when using APIs? – think about IT