none
Filter summary tasks that are complete RRS feed

  • Question

  • I use Project Professional 2013.

    I would like filter my tasks where all tasks under the summary tasks are complete. In the below example, I only want to see Summary 3 and the tasks under it, as they are all 100% complete. 

    If I use the filter complete tasks in MS Project, it shows me all the summaries.

    Any suggestions?

    Summary 1 80%
    summary a  50%
    t1 0%
    t2 100%
    Summary 2 60%
     summary b 0%
     t1 0%
     t2 0%
     summary c 100%
     t3 100%
     t4 100%
     t5 100%
    Summary 3 100%
     summary d 100%
     t1 100%
     t2 100%
     summary e 100%
     t3 100%
     t4 100%
     t5 100%

    Sunday, July 31, 2016 11:57 AM

Answers

  • HFProjects,

    Aw come on, let's make this interesting. Rod's right of course, you can't get there with a filter alone but with a little VBA you can get exactly what you want (at least per your example). The following macro will do it.

    John

    Sub FullyCmplt()
    Dim t As Task, st As Task
    Dim Found As Boolean
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            t.Flag1 = False
            If t.OutlineLevel = 1 Then Found = False
            If t.OutlineLevel = 1 And t.PercentComplete = 100 Or Found = True Then
                Found = True
                t.Flag1 = True
                If t.OutlineLevel > 1 Then t.Flag1 = True
            End If
        End If
    Next t
    FilterEdit Name:="HFProjects", taskfilter:=True, create:=True, overwriteexisting:=True, _
        FieldName:="flag1", test:="equals", Value:="Yes", showsummarytasks:=False
    FilterApply Name:="HFProjects"

    End Sub

    • Marked as answer by HFprojects Monday, August 1, 2016 12:10 PM
    Sunday, July 31, 2016 9:30 PM

All replies

  • Filters can't do that specifically, but try:

    1. View, Filter,More Filters
    2. Select the Completed Tasks filter
    3. Click Edit
    4. Deselect the Show related summary tasks option

    Apply the filter again and see what difference that makes. You will still see all tasks 100% complete so not completely what you want.


    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

    Sunday, July 31, 2016 7:45 PM
    Moderator
  • HFProjects,

    Aw come on, let's make this interesting. Rod's right of course, you can't get there with a filter alone but with a little VBA you can get exactly what you want (at least per your example). The following macro will do it.

    John

    Sub FullyCmplt()
    Dim t As Task, st As Task
    Dim Found As Boolean
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            t.Flag1 = False
            If t.OutlineLevel = 1 Then Found = False
            If t.OutlineLevel = 1 And t.PercentComplete = 100 Or Found = True Then
                Found = True
                t.Flag1 = True
                If t.OutlineLevel > 1 Then t.Flag1 = True
            End If
        End If
    Next t
    FilterEdit Name:="HFProjects", taskfilter:=True, create:=True, overwriteexisting:=True, _
        FieldName:="flag1", test:="equals", Value:="Yes", showsummarytasks:=False
    FilterApply Name:="HFProjects"

    End Sub

    • Marked as answer by HFprojects Monday, August 1, 2016 12:10 PM
    Sunday, July 31, 2016 9:30 PM
  • The VBA is necessary if you want to see only the level 1 summaries, but if not then d and e also qualify, since all of their tasks are 100%.

    So just copy the complete tasks filter and insert one row init, summary = yes, and uncheck show related summaries.

    Sunday, July 31, 2016 11:45 PM
  • Thank you Rod, John and Trevor for your excellent and most helpful answers. The VBA worked perfectly!

    I wanted to use the length of the wbs each task in order to address the issue as Len(WBS) = 1 and % complete = 100 would enable me to filter. Unfortunately the length of summary tasks shows as blank (see below). Why is that?

    wbs Task         Length      
    1     Summary 1
    1.1     Summary a
    1.1.1     t1                 5
    1.1.2     t2                 5


    • Edited by HFprojects Monday, August 1, 2016 12:12 PM
    Monday, August 1, 2016 8:00 AM
  • HF projects,

    First of all, you're welcome and thanks for the feedback.

    With regard to your idea of using a formula, it won't achieve what you asked for (i.e. show the Summary 3 level and all subtasks below it), but it does work as long as you set the "calculation for task and group summary rows" to "Use Formula".

    Just for interest, in versions of Project prior to Project 2010 you would be able to simply filter on an Outline Level of 1 and % Complete of 100 percent. In your example, that will display the Summary 3 level task by itself but if you then expand that filtered task you will also see all the subtasks under it.

    John


    Monday, August 1, 2016 1:38 PM