Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Emp_fullname | Date_Time | Break |
Name1 | 4/9/2023 11:30 | 00:05:30 |
Name1 | 4/9/2023 12:00 | 00:06:48 |
Name1 | 4/9/2023 17:00 | 00:10:05 |
Name2 | 4/9/2023 16:30 | 00:19:58 |
Name2 | 4/9/2023 17:00 | 00:09:21 |
Name3 | 4/9/2023 11:00 | 00:14:59 |
Name3 | 4/9/2023 16:00 | 00:15:00 |
Name4 | 4/9/2023 12:00 | 00:15:00 |
Name4 | 4/9/2023 16:30 | 00:13:53 |
Name4 | 4/9/2023 17:00 | 00:01:03 |
I want to separete the first break to the second break, so I can compare the time the person use Break 1 and Break 2. The issue is that both values are in the same column and some of them even have 3 entries.
@erick2599 , You need to have rank column
I think for that you also need a date column
New columns in the table
Date = datevalue([Date_time])
Break Rank = Rankx(filter(Table, [Emp_name] = earlier([emp_name]) && [Date] = earlier([Date]) ) , [Date_time])
Now create a table
Compare = generateseries(Min(Table[Break Rank]), Min(Table[Break Rank]) )
Join the value column with Break Rank column
Now create these measures
1st Break time= calculate(Sumx(Table, Hour([Break])*3600 +Minute([Break])*60 + Second([Break]) ) , filter(all(Compare ), Compare[Value]=1) )
2nd Break time= calculate(Sumx(Table, Hour([Break])*3600 +Minute([Break])*60 + Second([Break]) ) , filter(all(Compare ), Compare[Value]=2) )
you can take a diff
User | Count |
---|---|
94 | |
86 | |
78 | |
69 | |
63 |
User | Count |
---|---|
114 | |
99 | |
97 | |
65 | |
59 |