DAX functions

How to calculate year-to-date value in DAX for Power BI?

How to calculate a year-to-date value of the sales in DAX for Power BI? Also called YTD, it represents the total to date of a given measure. For example, to calculate the year-to-date sales total with a DAX formula, use the built-in function called TOTALYTD. In this example, simply copy