Forum Discussion

Nobdyspecial's avatar
Nobdyspecial
New Member
2 years ago
Solved

Create a time series graph from a task table

I'm trying to figure out how to use Power BI to create a graph of worker task encumbrance from a table so that my organization can monitor and assess our total task commitments over a period of time. We regularly send teams out on the road for various amounts of time, and need to monitor our commitments into the future.

 

Each task is recorded in a table with Start and End dates, and the number of workers required (among vaious other data).

Task List    Start DateEnd Date  # of Pers Required
    
Task 11-Jul-2418-Jul-24  1
Task 224-Jan-2431-Jul-245
Task 31-May-241-Sep-241
Task 424-May-2430-Nov-244
Task 524-May-2430-Nov-248
Task 624-May-2430-Nov-2415
Task 716-Jun-2431-Jan-259
Task 819-Jul-2422-Aug-242
Task 916-Aug-2418-Sep-243
Task 1006-Jul-2431-Jan-252
Task 1108-Jul-2431-Jan-252
Task 1215-Jul-2415-Dec-241
Task 1324-Jul-2431-Jan-252

 

I somehow need to translate this into a graph that will show total workers on any given day, such as in the red line below.

 

While the table above only shows 13 tasks, my spreadsheet tracks over 100 tasks up to a year in advance and uses 2 different tables that vary only in the type of work to be performed.

 

Any idea how I can do this?

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Nobdyspecial ,

    In Power BI, the X and Y axes need to be definite columns of values, so I think you can create a new column.

    I create a calculated column and here is the DAX code.

    Column = DATEDIFF('Table'[Start Date],'Table'[End Date  ],DAY)

    Then you can get what you want.

     

     

     

     

    Best Regards

    Yilong Zhou

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

6 Replies

    • Nobdyspecial's avatar
      Nobdyspecial
      New Member

      I'm trying to re-create that graph as we did than manually. Trying to total the # of people column for any given day given the temporary nature of the tasks and then present the data for our Director, I'm brand new to PBI. My boss recommended I try it rather than doing this manually.

      • freginier's avatar
        freginier
        Solution Sage

        So you need a barchart with a color for each task ? or you need to summarize the number of task for each day ? or something else ? 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Nobdyspecial ,

    In Power BI, the X and Y axes need to be definite columns of values, so I think you can create a new column.

    I create a calculated column and here is the DAX code.

    Column = DATEDIFF('Table'[Start Date],'Table'[End Date  ],DAY)

    Then you can get what you want.

     

     

     

     

    Best Regards

    Yilong Zhou

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