I am currently working with a customer OLAP solution modelling a cube for analyzing Customer Invoices. I have to use CUSTINVOICEJOUR to resolve the customer for each invoice line. According to AX documentation, tables CUSTINVOICETRANS and CUSTINVOICEJOUR are related in the following way:
CustInvoiceTrans.SalesId==CustInvoiceJour.SalesId
and
CustInvoiceTrans.InvoiceId==CustInvoiceJour.InvoiceId
and
CustInvoiceTrans.InvoiceDate==CustInvoiceJour.InvoiceDate
and
CustInvoiceTrans.numberSequenceGroup==CustInvoiceJour.numberSequenceGroup
This makes some kind of sense, but in case of this particular customer, there are duplicate entries in CUSTINVOICEJOURNAL where the only difference is RECID. Therefore, my Invoice transactions are duplicated when the two tables are joined!
Any ideas about how this can occur, and maybe how to eliminate the problem? I found a partial answer mentioning tables CUSTINVOICELINE and CUSTINVOICETABLE and that the problem might relate to free text invoices that are actually duplicated to CUSTINVOICEJOUR, but I haven't been able to resolve the details...
I have built similar cubes in the past for other customers, and generally I have seen no problems with building my schema with the relation mentioned.
0