Forum Discussion

Teddibeer's avatar
Teddibeer
Helper I
3 years ago

Project time planner with resource

Dear all,

 

i am trying to create a table to view the total hours per person spend in specific weeks.

I have the project name, person, begin date, end date and time spend each day but I cant figure out how to get this in a matrix table.

Can someone assist me with it?

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Teddibeer ,

    I created some data:

    Here are the steps you can follow:

    1. In power query – Select [begin date] and [end date] – Unpivot Column.

    Result:

    2. Create calculated table.

    Table 2 =
    CALENDAR(
        DATE(2023,6,1),
        DATE(2023,12,31))

    3. Create measure.

    Measure =
    var _select=SELECTEDVALUE('Table 2'[Week])
    return
    COUNTX(
        FILTER(ALL('Table 2'),
        'Table 2'[Date]>=
    MINX(
        FILTER(ALL('Table'),
        'Table'[project name]=MAX('Table'[project name])&&'Table'[person]=MAX('Table'[person])),'Table'[Value])
    &&
    MAXX(
        FILTER(ALL('Table'),
        'Table'[project name]=MAX('Table'[project name])&&'Table'[person]=MAX('Table'[person])),'Table'[Value])
    &&
    'Table 2'[Week]  = _select),[Date])
    *
    MAX('Table'[time spend each day])
    Measure2 =
    var _table1=
    SUMMARIZE(
        'Table','Table'[project name],'Table'[person],"Value",[Measure])
    var _table2=
    SUMMARIZE(
        _table1,[project name],[Value])
    return
    IF(
        ISINSCOPE('Table'[person]),[Measure],
        IF(
            ISINSCOPE('Table'[project name]),
        SUMX(_table1,[Value]),
        SUMX(_table2,[Value])
    ))

    4. Result:

     

     

    Best Regards,

    Liu Yang

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

    • Teddibeer's avatar
      Teddibeer
      Helper I

      the unpivotting of the data is causing errors all over the report