Forum Discussion

acnt_schartner's avatar
acnt_schartner
Icon for Helper III rankHelper III
6 years ago
Solved

Logged Time to Average Time

Hello,   i have two Tables Labels Ticket_Key Ticket_Label P-00001 ACID-000001 P-00002 ACID-000001   Worklogs Worklog_ID Ticket_Key Time_Logged WID_1 P-00001 1 WID_2...
  • Fowmy's avatar
    Fowmy
    6 years ago

    acnt_schartner 

    I got the results, please check and accept if it works for you.
    Add the following measures;

     

     

    Total = SUM(Worklogs[Time_Logged])

     

     

     

    Avg = 
    VAR L = SELECTEDVALUE(Labels[Ticket_Label])
    VAR T = 
        SUMX( 
            FILTER(ALL(Worklogs),RELATED(Labels[Ticket_Label])=L),
            Worklogs[Time_Logged]
        )
    VAR DT = CALCULATE(DISTINCTCOUNT(Worklogs[Ticket_Key]),FILTER(ALL(Worklogs),RELATED(Labels[Ticket_Label])=L))
    
    RETURN
    DIVIDE(T,DT)

     

     

     

    Time Logged vs Avg = 
    DIVIDE(
        [Total],
        [Avg]
    )

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn