- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Facing issue building last year weekend date
Want to calculate Last Year weekend dates with respect to week number. SO This years and last years weeknd dates should be alligned to respective week number.
Below is the excel sheet which is to be replicated exactly in power BI, but facing errors in Power BI while creating formula for last year weekend column.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a calculated column.
LY Weekend Dates =
VAR a =
ADDCOLUMNS (
CALENDAR (
DATE ( YEAR ( [date] ) - 1, 1, 1 ),
DATE ( YEAR ( [date] ), 12, 31 )
),
"WEEKNUM", WEEKNUM ( [Date], 2 ),
"WEEKDAY", WEEKDAY ( [Date], 2 ),
"Year", YEAR ( [Date] )
)
RETURN
MAXX (
FILTER (
a,
[WEEKNUM] = EARLIER ( 'Table'[WEEKNUM] )
&& [WEEKDAY] = 7
&& [Year]
= YEAR ( EARLIER ( 'Table'[date] ) ) - 1
),
[Date]
)
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a calculated column.
LY Weekend Dates =
VAR a =
ADDCOLUMNS (
CALENDAR (
DATE ( YEAR ( [date] ) - 1, 1, 1 ),
DATE ( YEAR ( [date] ), 12, 31 )
),
"WEEKNUM", WEEKNUM ( [Date], 2 ),
"WEEKDAY", WEEKDAY ( [Date], 2 ),
"Year", YEAR ( [Date] )
)
RETURN
MAXX (
FILTER (
a,
[WEEKNUM] = EARLIER ( 'Table'[WEEKNUM] )
&& [WEEKDAY] = 7
&& [Year]
= YEAR ( EARLIER ( 'Table'[date] ) ) - 1
),
[Date]
)
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

User | Count |
---|---|
85 | |
78 | |
41 | |
40 | |
35 |