Forum Discussion

bhmiller89's avatar
bhmiller89
Helper V
8 years ago
Solved

Time Lapse

I have a column called "WorkDate" for Job Reports. Each Job Number has multiple Job Reports. I need to ultimately figure out how to show Job Numbers that have not had a Job Report entered within the last 90 days. I wrote a measure LastJR= MAX(WorkDate) but got stuck after that

  • Anonymous's avatar
    Anonymous
    8 years ago

    bhmiller89

     

    You can use the below measure:

    MAX_WorkDate = DATEDIFF(

    CALCULATE(MAX(Job_Report[WorkDate]),ALLEXCEPT(Job_Report,Job_Report[JobNumber])),

    NOW(),

    DAY)

     

    I assumed your data might look like below -

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    So MAX_WorkDate will give you number of days.

     

    Regards

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    bhmiller89

    Can you please post some sample data to better explain your requirement.

     

    Regards

  • Anonymous's avatar
    Anonymous
    Not applicable

    bhmiller89

     

    You can use the below measure:

    MAX_WorkDate = DATEDIFF(

    CALCULATE(MAX(Job_Report[WorkDate]),ALLEXCEPT(Job_Report,Job_Report[JobNumber])),

    NOW(),

    DAY)

     

    I assumed your data might look like below -

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    So MAX_WorkDate will give you number of days.

     

    Regards