Alfredomulet
MIS
Hello, anyone knows what MSTR objects would I need to create:
1. To calculate the number of days between the Changes of Status of an invoice (FACTURA)?
2. To obtain the last status of the Invoices (FACTURA), at a given date (for example on Jan 15th)?
The change dates are only stored in the fact table F_MOV_FACTURA that looks like:
F_MOV_FACTURA
ID_FACTURA--DATE_ID--STATUS_ID--F_ASSOCIATED_COST
1000004--01/05/2004--1--35.25
1000005--01/06/2004--1--35.20
1000004--01/14/2004--2--21.27
1000005--01/19/2004--2--27.10
...
I guess it would be easier to calculate it if I store the dates in columns rather than rows (something like FACTURA, STATUS001_DATE, STATUS002_DATE, etc... and using a function like ApplySimple("datediff(... )) but there are more than 60 different status for the invoice, so we'll need as much attributes...
Thanks in advance for your ideas.
Alfredo
1. To calculate the number of days between the Changes of Status of an invoice (FACTURA)?
2. To obtain the last status of the Invoices (FACTURA), at a given date (for example on Jan 15th)?
The change dates are only stored in the fact table F_MOV_FACTURA that looks like:
F_MOV_FACTURA
ID_FACTURA--DATE_ID--STATUS_ID--F_ASSOCIATED_COST
1000004--01/05/2004--1--35.25
1000005--01/06/2004--1--35.20
1000004--01/14/2004--2--21.27
1000005--01/19/2004--2--27.10
...
I guess it would be easier to calculate it if I store the dates in columns rather than rows (something like FACTURA, STATUS001_DATE, STATUS002_DATE, etc... and using a function like ApplySimple("datediff(... )) but there are more than 60 different status for the invoice, so we'll need as much attributes...
Thanks in advance for your ideas.
Alfredo