Forum Discussion

Syedsaddat00's avatar
Syedsaddat00
New Member
3 years ago
Solved

New column from conditional data

Hello Team, We have attendance data of users for checkin and checkout in row. Now i want to add two columns and having each user checkin and checkout time by each day. Some users have multiple check...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Syedsaddat00 ,

     

    According to your description, you want to pick earliest checkin and latest checkout, right? Here are my steps you can follow as a solution.

    (1)This is my test data.

    (2)We can create  a table.

    Table 2 = SUMMARIZE('Table','Table'[userid],'Table'[name] , 'Table'[date],"checkin", CALCULATE(MIN('Table'[time]),'Table'[checkin/checkout]="checkin" )  , "checkout",CALCULATE(MAX('Table'[time]),'Table'[checkin/checkout]="checkout" ) )

    (3) Then the result is as follows.

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

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