2 Replies Latest reply on Dec 3, 2018 9:50 AM by Stephen Groff

# COUNTING # of Days Since Safety Incident

Hello Folks,

I'm attempting to come up with a calculation that counts # of safe days FROM the last non-safe day.

So in the example below, our last safety incident was on 11/11/2018.  So I need to count the number of 1's from the most recent safety incident up until the current date (TODAY)

I'm assuming this is a FIXED LOD, but maybe not...

COUNT({FIXED [Date]:MAX(IF [Safe Day]=0 THEN... start counting up until today.

Any guidance would be much appreciated.  Thanks!

• ###### 1. Re: COUNTING # of Days Since Safety Incident

Last Non-Safe Day

{FIXED : MAX(IIF([Safe Day]=0, [Date], NULL))}

Then an LOD to give you the latest date in the data set

Last Day

{FIXED : MAX([Date])}

Then a calc to find the difference.

Safe Days

DATEDIFF('day', [Last Non-Safe Day], [Last Day])

See attached sample workbook.

1 of 1 people found this helpful
• ###### 2. Re: COUNTING # of Days Since Safety Incident

Perfect, thank you Ken!