hotw to obtain period of line item

Options
Szarek
Szarek Member, ALL USERS, GroupMember, Community Member Posts: 5 Occasional Contributor

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.

Szarek_0-1661759454019.png

Any idea?

thx for your time !

 

Comments

  • Szarek
    Szarek Member, ALL USERS, GroupMember, Community Member Posts: 5 Occasional Contributor

    week is not used as time period. it's a list, because we wanted to customize them per year.

     

     

  • Szarek
    Szarek Member, ALL USERS, GroupMember, Community Member Posts: 5 Occasional Contributor

    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) :

    Szarek_2-1661782444330.png

    I have a module with the loans, and the day of the payment (list formated)

    Szarek_0-1661782315458.png

    I have a calculation module to "convert" day of month to the week

    Szarek_4-1661782829418.png

     

    i have a module with the amount of interest and capital by month

    Szarek_5-1661783217545.png

     

     

    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 🙂

     

     

     

     

  • JJANIK
    JJANIK Member, ALL USERS, Certified Model Builder Posts: 5 Occasional Contributor

    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.

  • Szarek
    Szarek Member, ALL USERS, GroupMember, Community Member Posts: 5 Occasional Contributor

    I have finally solved this 😉

    my data module for loan with pay day : 

    Szarek_5-1662989404887.png

     

     i have a calendar : 

    Szarek_0-1662988998801.png 

    Szarek_1-1662989009499.png

     

    I have a calcul module :

    Szarek_2-1662989062695.png

    Szarek_3-1662989081690.png

    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 : 

    Szarek_4-1662989371235.png

     

     

     

     

    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....

    Szarek_6-1662989553105.png

    Szarek_7-1662989570330.png

     

     

    thx for the help !