Value referenc Price effective date
I have some questions on one of my models. Hope you can give me some advice. Thank you so much in advance! @DavidSmith
Here is the background information:
1) Source Module:
Flat file without time dimension
END EFFECTIVE DATE
2) Calculation Module:
Dimension: by month, by product
Calculate: 1) average price for the current month, 2) the price for the latest date in previous month if current month doesn’t have any price data.
3) Issue: How to deal with 3 prices in April and using 4/29/2019 price (11.1) for May?
Hello @Wendy ,
This is one way to acheive this, but there could be more as ways as well.
Average Price Transactions.FOB[AVERAGE: Transactions.Effective Date, AVERAGE: Transactions.Product Code] Last transaction date Transactions.Effective Date[MAX: Transactions.Product Code, MAX: Transactions.Effective Date] Last transaction IF Last transaction date = Transactions.Effective Date THEN ITEM(Transactions #) ELSE BLANK Last transaction @ FG Last transaction Last price of the month Transactions.FOB[LOOKUP: Last transaction @ FG] Offset Price OFFSET(Last price of the month, -1, 0)
Hope it helps.
The summary for "last transaction" should be "last non blank".
@ArunManickam Thank you so much for your suggestion! However, it appears that "Last transaction" line item in Module "Transaction data- By dimension" is empty. How did you get them in your test model? Thanks!0
@ArunManickam Thank you so much!!!0
Just wanted to pass this along, but the period should not be part of the code. In this instance, if I am reading it correctly, the code or list member should only be the transaction number (1062155501, 1062155531, 1062155503, etc.). Take a look at this article which shows why having date or period in the code is not good for performance:
Agreed! However, IT department can't provide the data with transaction numbers. That's why we had to create "unique ID' to do workaround.0
I would recommend using what you have, without the Date as part of the key:
115331062155531 115331062155503 115331062155501 115331062155529 115331062155528
The reason being is have the same code, 115331062155501 repeated 4 times, just a different month. If you removed the date from the code, you would only have this listed once in the list.
Yes, the concatenation of those combination without date is only on the List once by using 1st occurrence. The reason for including date in the "unique" ID is to capture all transactions. I wish that we have better clean data to deal with. Thanks!