Forum Discussion
Allocating Values Over Time Based on Initial Date
- 7 years ago
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] )Best Regards,
Dale
So are those tables related?
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-msft7 years ago
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] )Best Regards,
Dale- prill2ta7 years ago
Advocate II
Hey v-jiascu-msft,
Thank you very much. This is the solution I have been looking for.
I will be sure to study this to ensure that I completely understand what's going on!