Bi weekly pay period number

ypurcaro

New Member
Joined
Mar 7, 2013
Messages
29
Hello folks,

I can't find any information of this topic on youtube; so, I'm here hoping someone can help me with this problem.

I have a bi weekly payroll calendar that starts on December 21, 2020 to December 21, 2021. So, from the start date to the end date, for every 14 days, there should be a pay period. For example, the pay period 1 start from December 21, 2020 to January 2, 2021 and so forth. This will be my calendar table in power bi. How do we use Dax to identify the pay period based on the calendar?

Thanks for your help.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Like this?

P2 = IF(ISODD(WEEKNUM(Sheet1[Date]+20)),WEEKNUM(Sheet1[Date]+20),WEEKNUM(Sheet1[Date]+13))/2-1

1619151358164.png
 
Upvote 0
Solution
Like this?

P2 = IF(ISODD(WEEKNUM(Sheet1[Date]+20)),WEEKNUM(Sheet1[Date]+20),WEEKNUM(Sheet1[Date]+13))/2-1

View attachment 37352
Yes, something like this but the number of period is off. It did return 26 pay periods which exactly what I wanted. However, there is a -1 pay period. And the -1 pay period falls on the dates of 12/12/2021 and 12/19/2021. Then, on the pay period #26, it has only 12 days, missing dates 12/12/2021 and 12/19/2021. Since I've never worked on the calendar table like this, I have no clue but I do know we need to use the IF function, that's all I know. I appreciate your help very much.
 
Upvote 0
Well if those 2 specific dates break the formula you need something manual.

Otherwise my formula with - 2 at the end to start it at - 1
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top