Forum Discussion

RudolphVan's avatar
RudolphVan
Frequent Visitor
2 years ago
Solved

Average Login Times - Earliest Entries

Hi All   I need to display the average login time in a card visual, which can be filtered using a User name slicer. Since some users log in and out multiple times per day, we only require the avera...
  • Anonymous's avatar
    Anonymous
    2 years ago

    HotChilli , thanks for your concern about this case. 

     

    Hi RudolphVan 

     

    You can use the following dax to get the first login time each day:

    Column = CALCULATE(MIN('Table'[Time]),FILTER('Table','Table'[Date] = EARLIER('Table'[Date]) && 'Table'[Action] = "Login"))

     

    Then you can try converting the time to its corresponding number of seconds, calculating the average of those seconds, and then converting back to the time format.

     

     

     

     

     

    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.