Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I want to change my calendar so for some specific weekly calculations my week will start on Friday and end of Thursday.
This is my calendar below.
Which parts will I need to change below?
Solved! Go to Solution.
Hello @HarryB,
Can you please try the following approach:
VAR __RESULT =
ADDCOLUMNS (
ADDCOLUMNS (
__BASE,
"Year", YEAR ( [Date] ),
"Month Long", FORMAT ( [Date], "mmmm" ),
"Month Short", FORMAT ( [Date], "mmm" ),
"Month Number", MONTH ( [Date] ),
"Month and Year", FORMAT ( [Date], "mmm-yy" ),
"YYYYMM", FORMAT ( [Date], "MMM" ),
"Quarter", "Q" & QUARTER ( [Date] ),
"Day of Week Long", FORMAT ( [Date], "dddd" ),
"Day of Week Short", FORMAT ( [Date], "ddd" ),
"Day Sort", WEEKDAY ( [Date], 1 ),
"Week of Year", WEEKNUM ( [Date], 2 ),
"Week Ending Thursday",
VAR __DAY =
WEEKDAY ( [Date], 2 ) - 7
RETURN
[Date] - __DAY,
"Week Starting Friday",
VAR __DAY =
WEEKDAY ( [Date], 2 )
RETURN
[Date] - __DAY + (7 - __DAY) % 7
),
"Week Starting Thursday", [Week Ending Thursday] - 6
)
RETURN
__RESULT
Hello @HarryB,
Can you please try the following approach:
VAR __RESULT =
ADDCOLUMNS (
ADDCOLUMNS (
__BASE,
"Year", YEAR ( [Date] ),
"Month Long", FORMAT ( [Date], "mmmm" ),
"Month Short", FORMAT ( [Date], "mmm" ),
"Month Number", MONTH ( [Date] ),
"Month and Year", FORMAT ( [Date], "mmm-yy" ),
"YYYYMM", FORMAT ( [Date], "MMM" ),
"Quarter", "Q" & QUARTER ( [Date] ),
"Day of Week Long", FORMAT ( [Date], "dddd" ),
"Day of Week Short", FORMAT ( [Date], "ddd" ),
"Day Sort", WEEKDAY ( [Date], 1 ),
"Week of Year", WEEKNUM ( [Date], 2 ),
"Week Ending Thursday",
VAR __DAY =
WEEKDAY ( [Date], 2 ) - 7
RETURN
[Date] - __DAY,
"Week Starting Friday",
VAR __DAY =
WEEKDAY ( [Date], 2 )
RETURN
[Date] - __DAY + (7 - __DAY) % 7
),
"Week Starting Thursday", [Week Ending Thursday] - 6
)
RETURN
__RESULT
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
104 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |