Forum Discussion

mscabrera's avatar
mscabrera
Helper I
2 years ago
Solved

Time Tracking Compliance %

Hi everyone, I'm having troubles to get the Compliance % based on the hours logged per user. I have a table with the logged hours per person per "transaction/task" called -Hours Logged-, I also hav...
  • twi1's avatar
    2 years ago

    Hi again mscabrera , 
    here is modified code for measure and it works i tested it :

    w - HoursLoggedchemi1 =
    VAR SummarizedTable =
    SUMMARIZE(
    'Hours Logged',
    Dates[Date],
    'Hours Logged'[Name],
    "aggregHours",
    VAR CurrentName = 'Hours Logged'[Name]
    VAR DailyHours = LOOKUPVALUE(Resources[Daily Hours], Resources[Name], CurrentName)
    RETURN IF(SUM('Hours Logged'[Timesheet Hrs]) > DailyHours, DailyHours, SUM('Hours Logged'[Timesheet Hrs]))
    )
    RETURN
    IF(
    ISBLANK(SUMX(SummarizedTable, [aggregHours])),
    0,
    SUMX(SummarizedTable, [aggregHours])
    )

     

    Are there any further questions or it is the final solution, if it is final solution please mark it as a solution,
    Best regards