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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors