See attached PBIX, a dummy file of invoices. (Invoicenr, Invoice value, Months of revenue, Date, Client), with invoices having more than one month revenue in the future. For example, if Months of Revenue is 12, it means that the revenue is to be split over the future 12 months; when 1, the revenue belongs to the current month. (The revenue of the future months is calculated as Invoice amount / Months of revenue)
- I would like to have a query which creates a revenue fact table from the invoice fact table, with Revenue Date per month, Client, Revenue per month and Invoice number. This query should also work for renewed data.
I received already some code, but regrettably have too much problems with the M code syntax to get it to work, could anyone help me out ?
- Another solved topic on the forum was about some wrong double sales order data, which needed to be cleaned up, which was completely solved with a kind of M-code query. Could anyone provide me of some links where is explained how to develop such queries ? (preferably explained in the simplest possible way) ?
Thanks in advance !