Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
99 | |
90 | |
85 | |
74 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |