Skip to content

Commit adc5575

Browse files
authored
Update Calendar.dax
1 parent 4263c36 commit adc5575

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Miscellaneous/Scripts/DAX/Calendar.dax

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ VAR _result =
2222
, "Fiscal Year Period", FORMAT(EDATE([Date], 6), "yyyyMM")
2323
, "Fiscal Year Quarter Nbr", FORMAT(EDATE([Date], 6), "q")
2424
, "Fiscal Year Quarter", FORMAT(EDATE([Date], 6), "\F\Yyyyy \Qq")
25+
, "Fiscal Year Half", FORMAT(EDATE([Date], 6), "\F\Yyyyy \H") & ROUNDUP(MONTH(EDATE([Date], 6)) / 6, 0)
2526
, "Fiscal Year", YEAR(EDATE([Date], 6))
2627
, "Is Current FY", IF(YEAR(EDATE([Date], 6)) = _fiscal_year, 1, 0)
2728
, "Is Future", IF([Date] > _today_date, 1, 0)
@@ -32,6 +33,8 @@ VAR _result =
3233
, "Month", MONTH([Date])
3334
, "Week Ending", [Date] + 7 - WEEKDAY([Date], 1) // Saturday
3435
, "Week Starting", [Date] - WEEKDAY([Date], 1) + 1 // Sunday
36+
, "Week of Month", ROUNDUP(DIVIDE(DAY([Date]), 7), 0)
37+
, "Week of Year", WEEKNUM([Date])
3538
)
3639

3740
RETURN

0 commit comments

Comments
 (0)