Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
TravisK911
Frequent Visitor

Creating a 2-2-3 Schedule in Power Query

I have a table with dates in it and I need to assign either an "A" or "B" to the dates based on a pitman or "2-2-3" schedule.  For example:

Monday = A

Tuesday = A

Wednesday = B

Thursday = B

Friday = A

Saturday = A

Sunday = A

Monday = B

Tuesday = B

Wednesday =A

Thursday = A

Friday = B

Saturday = B

Sunday = B 

The whole scedule repeats every two weeks.

 

I'm not sure how to apply the "A" or "B" designator in Power Query.  Any ideas?

1 ACCEPTED SOLUTION
edhans
Community Champion
Community Champion

There are probably a few ways to do this, but this uses the ribbon almost exclusively without generating lists.

edhans_0-1630974501168.png

Here is what I did:

  1. Created a table of the letters, all 14.
  2. Added an index starting at 0 to it. So they are numbered 0-13.
  3. From my dates, starting with Monday, created another list going out several month.
  4. Added an index starting at 0
  5. Took the modulus of the index divided by 14. This returned a repeating sequence of 0-13 through infinity.
  6. Merged this with the table of my letters in steps 1/2 above.

My file is here if you want to take a look at it.

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

4 REPLIES 4
TravisK911
Frequent Visitor

This looks like it will work.  Nice job!  

Glad to help @TravisK911 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
wdx223_Daniel
Community Champion
Community Champion

wdx223_Daniel_0-1630991303172.png

 

edhans
Community Champion
Community Champion

There are probably a few ways to do this, but this uses the ribbon almost exclusively without generating lists.

edhans_0-1630974501168.png

Here is what I did:

  1. Created a table of the letters, all 14.
  2. Added an index starting at 0 to it. So they are numbered 0-13.
  3. From my dates, starting with Monday, created another list going out several month.
  4. Added an index starting at 0
  5. Took the modulus of the index divided by 14. This returned a repeating sequence of 0-13 through infinity.
  6. Merged this with the table of my letters in steps 1/2 above.

My file is here if you want to take a look at it.

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.