How to calculate mean interval between transactions per material in the following module which is one dimensional.
Solved! Go to Solution.
As a first step you need to calculate the difference between the Date of Today and Previous Posting Date. At the moment Anaplan does not have a formula integrated as Excel to retrieve Today's date (NOW()), so you need to import that everyday using Anaplan Connect or select it manually.
However, for the testing purposes, you can just create a module and manually select the date of today. Then as simple using (Today-PSTNG Date) you will get 'Days since Previous'. On the same line item (in blue print), you can change the summary method to Average, and get the result you are looking for. You can chose to calculate the average as well in a separate line item (use Select: Total).
Please find below a simple example I created in Anaplan based on my explanation. As well, there are other ways of calculating this, also depending of what do you want to do further with the result. If is statistics related, I recommend you to check for Statistics best practices on Anapedia.
Hope it helps!
Thanks for this. This may potentially lead to a solution, but not yet.
We have today's date, so no worries.
But average with respect to today's date is not the same as mean interval between subsequent transactions.
HI @ArunManickam ,
I understood, that was my understanding that you need the comparison with today's date. Sorry
if I read your answer, in fact the issue is with getting the Posting date in Anaplan?
The best is to make an import, then instead of using Today's date use the one imported.
Hi @ArunManickam ,
As per my understanding, You need to fetch the Previous Posting Date, then by subtracting the Previous Posting Date from Posting date you can get the Days since previous.
To fetch Previous Posting Date You can Either
As per my understanding, please find the Snapshot of what I tried in Anaplan
Hope it helps.
Thanks for your inputs. We have 200k materials and millions of transaction. Copying and pasting is not feasible as a solution.
@ArunManickam : Can't you import Previous posting date Directly from Source (i.e. Seems to be Excel in your case) as you are importing the Posting Date in your module ??
I want to mention about 1 point in advance, i.e. RANK has a cell limit as mentioned in https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/RANK.html?_ga=2.1143538.25158203...
However i still want to discuss a possible solution that might be useful, if not with your particular issue, then maybe with some other issues.
'Transactions' is a list that rolls up to 'Materials'.
'Rank' is a list, with a property 'Previous Rank' of 'Rank' format. (Please create this in a SYSTEM modules as part of DISCO)
'Transaction Module' has the 'Posting Date', and the general idea is to rank the 'Transactions' within each 'Material'. Then the 'Rank' number is converted to 'Rank' list, so that we can then send it to another module 'Find Transaction'.
'Find Transaction' will place the relevant 'Transactions' sequentially for each 'Material'. And referring to Rank.Previous Rank, we can then find the Previous Transaction.
Back in 'Transaction Module', we can then populate 'Previous Transaction', and subsequently populate 'Previous Posting Date' and then calculate 'Days since Previous'.
Changing the summary method of 'Days since Previous' will give you the average of 'Days since Previous' at Materials level.