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.
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
MakeDate(FiscalYear, PeriodNo, 1) AS PeriodStart,
MakeTime(Hour, Minute) AS SlotTimePower BI equivalent
DAX
Period Start = DATE ( T[FiscalYear], T[PeriodNo], 1 )
Slot Time = TIME ( T[Hour], T[Minute], 0 )Power Query
= 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
#datefails on invalid parts, such as day 31 in April, while DAXDATEsilently 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.Fromin M orVALUEin DAX.
Official documentation
- makedate - script and chart function (Qlik Help)
- DATE function (DAX) (Microsoft Learn)
- #date (Power Query M) (Microsoft Learn)
- TIME function (DAX) (Microsoft Learn)
Related pages
Date(Date#(text, 'YYYYMMDD'), 'DD-MM-YYYY')
Date#() parsing and Date() formatting
Date#() interprets text as a date and Date() formats a number as a date, keeping it a dual. In Power BI, parse in Power Query with Date.FromText and set the display format on the column. DAX FORMAT() turns a date into text.
Partial / different approach
MonthStart(date [, period_no])
MonthStart, MonthEnd and period boundaries
MonthStart and MonthEnd return the first or last millisecond of a month. Use Date.StartOfMonth and Date.EndOfMonth in Power Query, or EOMONTH in DAX. Note that STARTOFMONTH in DAX is a table function, not the same thing.
Direct equivalent
LOAD ... AUTOGENERATE ... WHILE ... IterNo()
Master calendar (date table)
The Qlik master calendar script maps to a date table built in Power Query (List.Dates) or DAX (CALENDAR), marked as a date table and related to the fact date. It is essential for every time-intelligence function.
Direct equivalent
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.