cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PatrickLamoste Helper I
Helper I

Restart Pay Period Counting After 26th Pay Period

Hello!

 

I have a calendar with the corresponding Pay Period (Biweekly) which I did by using: 

 

Pay Period Number = FLOOR ( DATEDIFF ( DATE ( 2017,12,23 ), 'Biweekly (Pay Period)'[Date],DAY )/14,1)+1 

 

But the problem is that after the 26th instance it continues with the counting. I need it to start back at 1 after the 26th period, basically creating a cycle from 1 to 26.

 

Thank you! Cheers!

 

image.pngCalendar with Pay Period Numberimage.pngPay Period Last Instance

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Restart Pay Period Counting After 26th Pay Period

Hi @PatrickLamoste

 

Based on what you already have, try adding the MOD function:

 

Pay Period Number =
MOD (
    FLOOR (
        DATEDIFF ( DATE ( 2017; 12; 23 ); 'Biweekly (Pay Period)'[Date]; DAY ) / 14;
        1
    );
    26
)
    + 1

Although in this case your data is easy and quick to replicate, it is always best to show your sample data in text-tabular format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data and increases the likelihood of your question being answered.

 

Cheers

View solution in original post

1 REPLY 1
Super User III
Super User III

Re: Restart Pay Period Counting After 26th Pay Period

Hi @PatrickLamoste

 

Based on what you already have, try adding the MOD function:

 

Pay Period Number =
MOD (
    FLOOR (
        DATEDIFF ( DATE ( 2017; 12; 23 ); 'Biweekly (Pay Period)'[Date]; DAY ) / 14;
        1
    );
    26
)
    + 1

Although in this case your data is easy and quick to replicate, it is always best to show your sample data in text-tabular format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data and increases the likelihood of your question being answered.

 

Cheers

View solution in original post

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors