Forum Discussion

prill2ta's avatar
prill2ta
Advocate II
7 years ago
Solved

Allocating Values Over Time Based on Initial Date

I have two tables -

One with Assignment Volume designated by an Assignment Number.

The other table breaks out the Assignments by how many months they take and how much time is allocated per month. 

Tables shown below. 

 

I need a way to assign the Start Month in Table 1 to "Month in Assignment" =1 for that particular assignment type, and the subsequent months for that assignment. 

I need to create a calendar that shows how much time per month is needed based on the information I have.  I have been stumped for a week on this. Any advice?

 

  • Hi prill2ta,

     

    Since there isn't a month "February" for "A-100-101", I would suggest you create a new table. Please check out the demo in the attachment.

    Table =
    SELECTCOLUMNS (
        ADDCOLUMNS (
            FILTER (
                CROSSJOIN (
                    SELECTCOLUMNS (
                        'Table1',
                        "a", [Assignment Type],
                        "b", [Designator],
                        "c", [Start Month]
                    ),
                    Table2
                ),
                [a] = [Assignment Type]
            ),
            "startmonth", EDATE ( [c], [Month in Assignment] - 1 )
        ),
        "Designator", [b],
        "Assignment Type", [a],
        "Month in Assignment", [Month in Assignment],
        "Time Dedication (hrs)", [Time Dedication (hrs)],
        "Final StartMonth", [startmonth]
    )
    

    Allocating-Values-Over-Time-Based-on-Initial-Date

     

    Best Regards,
    Dale

4 Replies

    • prill2ta's avatar
      prill2ta
      Advocate II

      Hey Greg!

       

      In this "nerfed down" instance of my particular issue, yes. 

       

      These are related by the Assignment Type. 


      I am able to currently calculate a total time needed per assignment with no issues.  The main problem I am having is assigning the Start Date of the Assignment to Month in Assignment = 1. 

       

      For example: 

       

      Assignment Designator "A-100-101" has Start Month = "1/1/2016" and Assignment Type = "1"

      I can see from the Time Table that Assignment Type = "1" has a duration of 4 months ("1", "2", "3", "4"), and each month has a different time requirement. 

       

      I am looking to be able to say that for "A-100-101" January 2016 =1.25 hrs, Feburary = 1hrs, March = 0.5hrs, and April = 1.5hrs based on the second table. 

      • v-jiascu-msft's avatar
        v-jiascu-msft
        Microsoft Employee

        Hi prill2ta,

         

        Since there isn't a month "February" for "A-100-101", I would suggest you create a new table. Please check out the demo in the attachment.

        Table =
        SELECTCOLUMNS (
            ADDCOLUMNS (
                FILTER (
                    CROSSJOIN (
                        SELECTCOLUMNS (
                            'Table1',
                            "a", [Assignment Type],
                            "b", [Designator],
                            "c", [Start Month]
                        ),
                        Table2
                    ),
                    [a] = [Assignment Type]
                ),
                "startmonth", EDATE ( [c], [Month in Assignment] - 1 )
            ),
            "Designator", [b],
            "Assignment Type", [a],
            "Month in Assignment", [Month in Assignment],
            "Time Dedication (hrs)", [Time Dedication (hrs)],
            "Final StartMonth", [startmonth]
        )
        

        Allocating-Values-Over-Time-Based-on-Initial-Date

         

        Best Regards,
        Dale