Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I am creating a date table and I would like a column for the end of week (sunday) for each week. I've tried;
"Week End Date", [Date] - WEEKDAY([Date],2)+7,
But you can see it isn't working.
Date =
VAR MinYear = YEAR ( MIN ( 'Flights'[Start date ] ) )
VAR MaxYear = YEAR ( MAX ( 'Flights'[Start date ] ) )
RETURN
ADDCOLUMNS (
FILTER (
CALENDARAUTO( ),
AND ( YEAR ( [Date] ) >= MinYear, YEAR ( [Date] ) <= MaxYear )
),
"Calendar Year", "CY " & YEAR ( [Date] ),
"Month Name", FORMAT ( [Date], "mmmm" ),
"Month Number", MONTH ( [Date] ),
"Weekday", FORMAT ( [Date], "dddd" ),
"Weekday number", WEEKDAY( [Date] ),
"Week End Date", [Date] - WEEKDAY([Date],2)+7,
"Week Number", WEEKNUM([Date],2),
"Quarter", "Q" & TRUNC ( ( MONTH ( [Date] ) - 1 ) / 3 ) + 1
)
Thanks for any help.
Solved! Go to Solution.
@Anonymous , weekend
Sunday
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Saturday
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],1)
for all other week day, refer to my blog and files
Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Power-BI-Turning/ba-p/1187482
Thank you for this, I search everywhere. This is so simple and works great!
@Anonymous , weekend
Sunday
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Saturday
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],1)
for all other week day, refer to my blog and files
Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Power-BI-Turning/ba-p/1187482
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |