DATESMTD, DATESQTD, DATESYTD – dates from the beginning of month / quarter / year (DAX – Power Pivot, Power BI)
You can use the DATESMTD, DATESQTD, DATESYTD as filters to get the values from the beginning of period.
Let´s say say there is a table with columns “Date” and “Value”. And you need the cumulated value until today (or to some other date). All you need is to create a measure:
- YTD values = CALCULATE(SUM(incidents[Value]);DATESYTD(incidents[Date]);ALL())
You can use the DATESMTD, DATESQTD, DATESYTD as filters to get the values from the beginning of period.
Let´s say say there is a table with columns "Date" and "Value". And you need the cumulated value until today (or to some other date). All you need is to create a measure:
- YTD values = CALCULATE(SUM(incidents[Value]);DATESYTD(incidents[Date]);ALL())
Hello,
Please explain why you use “ALL()” in the formula,
thanks