MakeDate(Year, Month, 1)

MakeDate and MakeTime in Power BI

MakeDate(YYYY, MM, DD) maps directly to DAX DATE(y, m, d) and Power Query #date(y, m, d). MakeTime maps to TIME() and #time(). Watch out for invalid input. DAX DATE rolls over, so month 13 becomes January of the next year, while Power Query #date raises an error.

Direct equivalent DAX Power Query

Short answer: Use DATE(T[Year], T[Month], 1) in DAX or #date([Year], [Month], 1) in M. For first-of-month keys, prefer building the date in Power Query.

What it does in Qlik

  • MakeDate(YYYY [, MM [, DD]]) returns a date, with month and day defaulting to 1.
  • MakeTime(hh [, mm [, ss]]) returns a time.
  • MakeWeekDate(YYYY [, WW [, D]]) builds a date from a year and week.

Qlik example

Qlik script
MakeDate(FiscalYear, PeriodNo, 1) AS PeriodStart,
MakeTime(Hour, Minute)            AS SlotTime

Power BI equivalent

DAX

DAX
Period Start = DATE ( T[FiscalYear], T[PeriodNo], 1 )
Slot Time    = TIME ( T[Hour], T[Minute], 0 )

Power Query

Power Query M
= Table.AddColumn(T, "PeriodStart", each #date([FiscalYear], [PeriodNo], 1), type date)
= Table.AddColumn(T, "SlotTime", each #time([Hour], [Minute], 0), type time)

Gotchas and behaviour differences

  • #date fails on invalid parts, such as day 31 in April, while DAX DATE silently rolls over to the next month. A DAX-built date that looks one month off usually traces back to this.
  • Year/month text columns ("2026", "03") must be converted to numbers first, with Number.From in M or VALUE in DAX.

Official documentation

Related pages

Spotted an error or a better pattern? QlikToDax is maintained by a working BI consultant; corrections are welcome via the About page. Last reviewed 2026-10-25.