Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Display values based on last 2 weeks data dynamically change the dates every day to last 2 weeks

Hi

 

How to display values from 'Title' Column whose completed date in last 2 weeks?

 

    

 

Thanks

Kunuthuri

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

     

    Do you mean calculate count of records which completed 2 weeks ago and 'title' similar as current one?

    If this is a case, you can try to use below measure:

    Count of Previous 2 weeks complete records=
    VAR currDate =
        MAX ( Table[Date] )
    VAR currTitle =
        FIRSTNONBLANK ( Table[Title], [Title] )
    RETURN
        COUNTROWS (
            FILTER (
                ALLSELECTED ( Table ),
                [Date]
                    <= currDate - 14
                    && [Work] = "completed"
                    && [Title] = currTitle
            )
        )
    

    If above not help, please share some expected result to help us clarify your requirement.

     

    Regards,

    Xiaoxin Sheng