hotw to obtain period of line item
Hello,
I'm stuck on a formula that seems obvious to me. I would like to retrieve the time period of a line item :
Week : list formated.
time period by week : format time period, applies to week => i want to obtain time period for each week.
Any idea?
thx for your time !
Best Answer
-
I have finally solved this 😉
my data module for loan with pay day :
i have a calendar :
I have a calcul module :
My formula for "semaine3" is horrible but it works... If the pay day dont exist on the month (day 31 for february for exemple), it take the week of the last day wich exist of the month.
And finally my module to convert interest from month to week :
My mind was traped by the system module i have make before for the week list, I wanted at all costs to use it to convert the day of a month into a week....
thx for the help !
0
Answers
-
Hi Szarek, can you please add more details here, like what is the purpose of this mapping, is your model using weeks as time periods? How the blueprint looks like? Are you trying to get first week of the month for a reference? If yes, wouldn't it be better to have a time dime dimension that use weeks instead of months? OR have a separate System module where for each period by month you map Weeks, for example by getting period start date START() and using that date for finding week, but I think your model needs to be set with weeks in first place for that to work.
0 -
week is not used as time period. it's a list, because we wanted to customize them per year.
0 -
@Szarek If I understood correctly you are in this situation: your initial data is input/calculated per Month (Time list) and you would like to have the same data in a week module where you have the mapping from your screen:
Jan 22: Week 1
Feb: Week 5
....etc...
If this is the case, then you should have the mapping in a system module, the other way around: a module with the Week List and the line-item as Time...
Week1: Jan 22
Week5: Feb 22
In order to take data from the Initial data per month, you can use a Lookup.
Hope it helps
Alex
0 -
i will post the entire case, maybe this would be easier to explain , we want to make a cash budget by week.
but most of the information to make budget are in month, that's why we work in month time.
i have a system module to define the time period of each week (week are a list) :
I have a module with the loans, and the day of the payment (list formated)
I have a calculation module to "convert" day of month to the week
i have a module with the amount of interest and capital by month
and i want to obtain the result in the line item "test" wich have time YEAR and applies with week.
The problem is the week S13 is defined on march 2022 in first module, but have the first april in too.
so i made the formula :
Rbt_interest[SUM: week, LOOKUP: SYS Semaine.Mois]
so i wanted to replace the month of my first module by the month of the week.
i am not sure its very clear, hard to explaind and i am french 🙂
1 -
@Szarek Usually, the formula should be something like this: Rbt_interest[SUM: week, SUM: Year of Month]
However, Time list is a special list that does not behave the same way as "normal" list, especially it is needed to change the granularity of the data.
If I understood correctly your case: you need to start from Data granularity is at Month Level and you want to arrive to a granularity of Year, Week level, where Month and Year are part of Time Anaplan list.
As previously stated, this can be achieved by changing the necessity to have SUM into LOOKUP:
It is needed that every week/Year combination to have associated with the correct Month (see below picture in line-item "Rbt Month")
This is start Data granularity:
And this is Data granularity: Year, Week using LOOKUP
Hope it helps
Alex
0