Adding weekly start date end date to my date table based on week number

0 votes
Adding weekly start date & end date to my date table based on week number?

 I add weekly start and end dates to my date table in Power BI based on the week's number
Oct 22 in Power BI by Evanjalin
• 5,530 points
78 views

1 answer to this question.

0 votes

In order to incorporate weekly start and end dates in your date table based on the week number, you might want to take the following steps:

Step 1: Create Your Date Table

If you do not already have a date table created, you can create one by simply filling in dates for the range. For example, open Excel, take the first date in the range you desire and drag it downwards all the way to the last date.

Step 2: Add Week Number

Now you have to find out the week number for each date. In Excel, you can calculate the weekly number by using the function WEEKNUM:

=WEEKNUM(A2)

Step 3: Determine Start and End Dates of Each Week

Now, you'll create two additional columns; one for the week start date and the other for the week end date.

Calculating the Start Date

In order to calculate the week's start date, one can make use of the following equation in the newly created column:

The mechanism of this equation is:

=A2 - WEEKDAY(A2, 2) + 1

End Date Calculation

In order to calculate the end date of the week, i.e., Sunday, use this formula in another new column:

=A2 + (7 - WEEKDAY(A2, 2))

This is the way it functions:

Numerous days remain until Sunday, which can be calculated by the formula 7 - WEEKDAY(A2, 2). The total can be included in the existing date to arrive at the next Sunday date.

Step 4: Fill Down

After the formula is written in the first row of the data table, it can be expanded downwards to the next rows as well.

Example

For instance, suppose you have a date 2024-10-22 (Tuesday). How the order of operations will work:

Start Date: 2024-10-21 (Monday)

End Date: 2024-10-27 (Sunday)

Final Outcomes

With the help of these steps, you will design a date table that provides the start and end dates of every week in relation to the number of that week. This will mitigate the problem of weeks not being accounted for while deposing the data.

answered Oct 22 by pooja
• 4,690 points

Related Questions In Power BI

0 votes
0 answers

Adding weekly start date & end date to my date table based on week number?

Adding weekly start date & end date ...READ MORE

Oct 14 in Power BI by anonymous
• 5,530 points
62 views
0 votes
3 answers

How to create final table based on Joins of two tables in power BI?

To do so, follow these steps: From the ...READ MORE

answered Dec 16, 2020 in Power BI by Gitika
• 65,770 points
55,980 views
0 votes
1 answer

How to create summary table based on selected filters/slicers?

Here are the steps you can follow: 1. ...READ MORE

answered Nov 12, 2020 in Power BI by anonymous
• 65,770 points
2,975 views
0 votes
1 answer

Locating closest match based on Latitude & Longitude

First of all, we need to use the ...READ MORE

answered Jan 2, 2019 in Power BI by Shubham
• 13,490 points
3,175 views
0 votes
1 answer

Which one should I choose Tableau or Power BI?

Hi Grim, Both the BI tools - Tableau ...READ MORE

answered Apr 6, 2018 in Tableau by ghost
• 1,790 points
999 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
3,662 views
0 votes
1 answer

Bar chart : Arranging in descending order using data from another chart

Select treemap.  Make it active.  Turn on Visual Interactions ...READ MORE

answered Feb 8, 2019 in Power BI by Upasana
• 8,620 points
844 views
0 votes
1 answer

How to refresh a gateway running on Azure VM?

You can easily resolve this error by ...READ MORE

answered Jun 10, 2019 in Power BI by Avantika
• 1,520 points
1,313 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP