Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Solved! Go to Solution.
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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |