Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Matrix: Monthly Grand total for Project Timeline

I'm using the project timeline that Mr. Will Thompson posted some times ago.  It's very useful to me. And I'm looking forward to having the grand total & subtotal.  It just doesn't sum up the headc...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous 

     

    Here is the solution.
    Change the measure to this and you will see the total.

    Stage Text = 
    var selectedDate = SELECTEDVALUE(Dates[Date])
    var projectsBetweenDates = FILTER(Projects, Projects[Start Date] <= selectedDate && Projects[End Date] >= selectedDate)
    var numberProjects = COUNTROWS(projectsBetweenDates)
    var projectState = CALCULATE(MIN(Projects[Stage]), projectsBetweenDates)
    var headcount= IF(SELECTEDVALUE(Projects[Description])="",CALCULATE(SUM(Projects[Manpower]),projectsBetweenDates),CALCULATE(MAX(Projects[Manpower]),projectsBetweenDates))
    return IF(projectState<>"", headcount, " ")

     

    Find the pbix attached after signature.