Rupal Patel

Rupal Patel

  • 1.7k
  • 31
  • 1.1k

No of consecutive days -worked by employee

Feb 9 2023 1:48 PM

Hello to all,

I would like to calculate in DAX -no of consecutive days worked by employee.

The last column in below table.

SITEID Vendor_name Contractor Name Laborcode WORKDATE LaborHrs No of consecutive days
Horizon ABC LTD  AHMED A30011442 10/27/2022 12 1
Horizon ABC LTD  AHMED A30011442 10/28/2022 12 2
Horizon ABC LTD  AHMED A30011442 10/29/2022 12 3
Horizon ABC LTD  AHMED A30011442 10/30/2022 6 4
Horizon ABC LTD  AHMED A30011442 10/30/2022 6 4
Horizon ABC LTD  AHMED A30011442 10/31/2022 12 5
Horizon ABC LTD  AHMED A30011442 11/1/2022 8 6
Horizon ABC LTD David A30021329 11/30/2022 12 1
Horizon ABC LTD David A30021329 12/1/2022 12 2
Horizon ABC LTD David A30021329 12/2/2022 12 3
Horizon ABC LTD David A30021329 12/3/2022 12 4
Horizon ABC LTD David A30021329 12/4/2022 6 5
Horizon ABC LTD David A30021329 12/4/2022 -6 5
Horizon ABC LTD David A30021329 12/4/2022 8 5
Horizon ABC LTD David A30021329 12/5/2022 12 6
Horizon ABC LTD David A30021329 12/6/2022 8 7
Horizon ABC LTD David A30021329 12/14/2022 12 1
Horizon ABC LTD David A30021329 12/15/2022 12 2
Horizon ABC LTD David A30021329 12/16/2022 8 3
Horizon ABC LTD David A30021329 12/16/2022 4 3
Horizon ABC LTD David A30021329 12/17/2022 12 4
Horizon ABC LTD David A30021329 12/18/2022 12 5
Horizon ABC LTD David A30021329 12/19/2022 12 6
Horizon ABC LTD David A30021329 12/20/2022 8 7
Horizon ABC LTD David A30021329 12/28/2022 9 1
Horizon ABC LTD David A30021329 12/29/2022 12 2
Horizon ABC LTD David A30021329 12/30/2022 13 3
Horizon ABC LTD David A30021329 12/31/2022 12 4
Horizon ABC LTD David A30021329 1/1/2023 12 5
Horizon ABC LTD David A30021329 1/2/2023 12 6
Horizon ABC LTD David A30021329 1/3/2023 8 7
Horizon ABC LTD David A30021329 1/13/2023 12 1
Horizon ABC LTD David A30021329 1/14/2023 12 2
Albian XYZ  Sony A30001729 10/1/2022 5.5 1
Albian XYZ  Sony A30001729 10/2/2022 5.5 2
Albian XYZ  Sony A30001729 10/3/2022 5.5 3
Albian XYZ  Sony A30001729 10/4/2022 7 4
Albian XYZ  Jager A30001600 10/6/2022 11.5 1
Albian XYZ  Jager A30001600 10/7/2022 11.5 2
Albian XYZ  Jager A30001600 10/8/2022 11.5 3
Albian XYZ  Jager A30001600 10/9/2022 11.5 4
Albian XYZ  Jager A30001600 10/10/2022 11.5 5
Albian XYZ  Jager A30001600 10/11/2022 11.5 6
Albian XYZ  Jager A30001600 10/12/2022 11 7
Albian XYZ  Lee A30001665 11/25/2022 12 1
Albian XYZ  Bear A30021315 12/15/2022 12 1
Albian XYZ  Bear A30021315 12/16/2022 12 2
Albian XYZ  Bear A30021315 12/17/2022 12 3
Albian XYZ  Bear A30021315 12/18/2022 12 4
Albian XYZ  Bear A30021315 12/19/2022 12 0
Albian XYZ  Bear A30021315 12/19/2022 -12 0
Albian XYZ  Bear A30021315 12/20/2022 12 1
Albian XYZ  Bear A30021315 12/21/2022 10 2
Albian XYZ  Bear A30021315 12/29/2022 12 1
Albian XYZ  Bear A30021315 12/30/2022 12 2
Albian XYZ  Bear A30021315 12/31/2022 12 3
Albian XYZ  Bear A30021315 1/1/2023 12 4
Albian XYZ  Bear A30021315 1/2/2023 12 5
Albian XYZ  Bear A30021315 1/3/2023 12 6
Albian XYZ  Bear A30021315 1/4/2023 10 7
Albian XYZ  Bear A30021315 1/12/2023 12 1
Albian XYZ  Bear A30021315 1/13/2023 12 2
Albian XYZ  Bear A30021315 1/14/2023 12 3

Thanks 


Answers (6)