Page 21 - DAX-Formula-Reference-Guide-Enterprise-DNA_Neat
P. 21

DAX Formulas Reference Guide  |  Date and Time Functions (DAX)



                STARTOFYEAR Function (DAX)
                Returns the first date of the year in the current context for the specified column of dates.

                Syntax: STARTOFYEAR(<dates>)



                Parameter                    Definition
                dates                        A column that contains dates.

                year_end_date                A year_end_date value. (Optional)



                Return Value:
                A table containing a single column and single row with a date value.

                =STARTOFYEAR(DateTime[DateKey])


                TOTALMTD Function (DAX)
                Evaluates the value of the expression for the month to date, in the current context.

                Syntax: TOTALMTD(<expression>,<dates>[,<filter>])



                Parameter                    Definition
                expression                   An expression that returns a scalar value.

                dates                        A column that contains dates.

                filter                       An expression that specifies a filter to apply to the current context.
                                             (Optional)



                Return Value:
                A scalar value that represents the expression evaluated for the dates in the current
                month-to-date, given the dates in dates.

                =TOTALMTD(SUM(InternetSales_USD[SalesAmount_USD]),DateTime[DateKey])


                TOTALQTD Function (DAX)
                Evaluates the value of the expression for the dates in the quarter to date in the current
                context.

                Syntax: TOTALQTD(<expression>,<dates>[,<filter>])



                Parameter                    Definition
                expression                   An expression that returns a scalar value.

                dates                        A column that contains dates.

                filter                       An expression that specifies a filter to apply to the current context.
                                             (Optional)



                +64 21 164 5508  |  info@enterprisedna.co  21
   16   17   18   19   20   21   22   23   24   25   26