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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Mage
Frequent Visitor

Calculate Date in Power Query

Hi,

Suppose I have a weekly plan through a whole month, the table may like this:

Mage_0-1726041914231.png

The plan will be handled from 1st weekday(Start Day) to 5rd weekday(End Day) each week originally. I want to transform them to concrete Start Dates and End Dates in the table by creating custom columns.

 

However, it will not be handled on the day IsLeave = 1. For example, in a week from 2024/12/30 to 2025/1/5, the original Start Date should be 2024/12/30, it delayed to 2024/12/31 due to 12/30 IsLeave = 1. In addition, the original End Date should be 2025/1/3, it delayed to 2025/1/7 due to 4 days leave in a week. So the expected output table may like:

Mage_1-1726042281655.png

How can I arrive it in Power Query, thanks a lot

 

Regards

1 REPLY 1
lbendlin
Super User
Super User

do you mean weekdays or workdays?  What is your definition of weekend?

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors