Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
prill2ta
Advocate II
Advocate II

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?

 

Assignment_Table.PNGTime_Table.PNG

1 ACCEPTED SOLUTION

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

So are those tables related?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

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. 

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.