Forum Discussion

DannyVickery's avatar
DannyVickery
Regular Visitor
8 years ago
Solved

Calculating elapsed time over different rows depending on status and claim number

Hi all,

I am a bit stuck, i want to calculate elapsed time between "Submitted" and "Approved by Hub" status.

 

They are over different rows liked by the claim #

 

Any help would be really apreciated

 

Thanks in advance 


  • DannyVickery wrote:

    Hi all,

    I am a bit stuck, i want to calculate elapsed time between "Submitted" and "Approved by Hub" status.

     

    They are over different rows liked by the claim #

     

    Any help would be really apreciated

     

    Thanks in advance 


    DannyVickery

    You can try to create measures like 

     

    submitted time =
    MAXX (
        FILTER ( 'Table', 'Table'[New_Status_c] = "SUBMITTED" ),
        'Table'[Change_date_c]
    )
    
    
    approved time =
    MAXX (
        FILTER ( 'Table', 'Table'[New_Status_c] = "APPROVED BY HUB" ),
        'Table'[Change_date_c]
    )
    
    elapsed hours = DATEDIFF([submitted time],[approved time],MINUTE)/60

     

1 Reply

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    DannyVickery wrote:

    Hi all,

    I am a bit stuck, i want to calculate elapsed time between "Submitted" and "Approved by Hub" status.

     

    They are over different rows liked by the claim #

     

    Any help would be really apreciated

     

    Thanks in advance 


    DannyVickery

    You can try to create measures like 

     

    submitted time =
    MAXX (
        FILTER ( 'Table', 'Table'[New_Status_c] = "SUBMITTED" ),
        'Table'[Change_date_c]
    )
    
    
    approved time =
    MAXX (
        FILTER ( 'Table', 'Table'[New_Status_c] = "APPROVED BY HUB" ),
        'Table'[Change_date_c]
    )
    
    elapsed hours = DATEDIFF([submitted time],[approved time],MINUTE)/60