Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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 |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |