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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 headcount(manpower) monthly. Instead, it only picks up the max number of that columns.

Any guru have any idea how to resolve this? Here's my pbix file.

Picture1.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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.

 

Anonymous
Not applicable

@Anonymous , it works perfectly! Didn't know it's so easy!

Thank you for being so helpful. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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