0
votes

I have this table with only start time of every task. What I want to do is to calculate for every user his starting time (doesn't matter what task) and end time (doesn't matter what task). Basically I want working hours for each day for each each user.

Data Table

I tried to do this:

    enter work = MINX(
    SUMMARIZE(events,events[Date Only].[Date],events[user_id],
        "MINN",MIN(events[ConvertedTimeToInteger])
    ),
    [minn]
)

    exit work = MAXX(
    SUMMARIZE(events,events[Date Only].[Date],events[user_id],
        "MAXX",MAX(events[ConvertedTimeToInteger])
    ),
    [MAXX]
)

It works for a daily calculation, but for a total calculation its not good as it takes min/max of the date period: Table Results

Any help much appreciated

1
If you do not have a column with End time for every task, you cannot calculate the final end time. Do you want to use the max start time as the end time?ZygD
@ZygD thats what i did i used Min function for start time and Max for end timeBeni Levitan

1 Answers

0
votes

Ok, I have found a solution!

I had to summarize by 2 columns :

duration = SUMX(SUMMARIZE(events,events[date].[Date],events[user_id],"datesesese",DATEDIFf([Enter time],[exit time],HOUR)),[datesesese])

Solution