Forum Discussion

itskool's avatar
itskool
Icon for Advocate II rankAdvocate II
4 years ago
Solved

Calculation of time spent

Hi,   I was wondering if someone could help me with a problem I have been wrecking my head about for days now. The case is the following: There is a workflow to request the creation of a new cust...
  • BA_Pete's avatar
    BA_Pete
    4 years ago

     

    The time from creation to first update should work in a very similar way:

    _firstResponseDays =
    IF(
        ISBLANK(updateLog[Created]),
        DATEDIFF(creationLog[Date Created], creationLog[Date Updated], DAY),
        DATEDIFF(creationLog[Date Created], MIN(updateLog[Created]), DAY)
    )

     

    The timings between to's and fro's in the updateLog table goes beyond this a bit.

    I would probably add an index column in PQ that starts at zero to your updateLog table, then merge the table on itself on:

    [Master ID] = [Master ID] and [Update ID] = [newIndexColumn]

    This will allow you to get a 'from' date and 'to' date between each interaction.

     

    Pete