in

 

Display the last 7 days worth of project comments and if no comments exist in the last 7 days, display only the last 1 comment.

Last post 03-18-2008 4:26 PM by Steve Thompson. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-13-2008 10:30 AM

    • dallen
    • Top 75 Contributor
    • Joined on 10-19-2006
    • Seattle
    • Posts 10

    Display the last 7 days worth of project comments and if no comments exist in the last 7 days, display only the last 1 comment.

    Create 1 Query:

    ·         Project name = Presentation].[Projects].[Project Name]

    ·         Updated on = [Presentation].[Project History].[Updated On]

    ·         Update notes = [Presentation].[Project History].[Update Notes]

    ·         Rank =  (new data item from toolbox) rank([Updated On] for [Project Name]) This gives a rank of newest to oldest updates for the project.

     

    Query 1, 2 filters:

    Filter 1

    (maximum([Updated On] for [Project Name])>= _add_days(current_date,-7)

    and

    [Updated On] >= _add_days(current_date,-7))

     

    or [Rank]=1

     

    The first part of this filter finds the latest updates for each project for the current day – 7 days (last 7 days of updates from today) “and” then defines what “updated on” date range is.… or, it takes the number 1 ranked update which we have defined as the “last” update that doesn’t fit into the above filter.

     

     

    Filter 2

     

    [Update Notes] is not null and [Update Notes]<>' '

     

     

    This filter excludes any updates that didn’t include any update notes or the updated notes were blank.

    Dave Allen
    Program Manager - Daptiv
  • 03-18-2008 4:26 PM In reply to

    Re: Display the last 7 days worth of project comments and if no comments exist in the last 7 days, display only the last 1 comment.

    Very nice, thanks! 

    Steve Thompson | Solutions Consultant
    Daptiv


Page 1 of 1 (2 items)

Navigate: Home | Blogs | Forums | Solution Library  Get Help:  Contact | Feedback | FAQ   Terms of Use:  Terms & Conditions | Privacy Policy