Forum Discussion
HBALAMURUGAN
3 years agoFrequent Visitor
Custom YTD
I want to create custom Year To date. I am currently using the query Calculate(Sum(value),DATEADD(Date,-1,Year)) and this calculation is -365 days. I want to give the start date as (Start of the d...
- 3 years ago
Calculate(Sum(value),DATESBETWEEN(Dates[Date],Date(Year(Today())-1,1,1),Today()-365))
v-yalanwu-msft
3 years agoCommunity Support
Hi, HBALAMURUGAN ;
You could create a measure as follow:
TotalYTD1 = TOTALYTD(SUM(Invoices[Total]), Dates[Date], ALL(Dates), "06/30")
if you want to change other date, could modify "6/30" to another date.
or try to use EDATE() funtion.
EDATE function (DAX) - DAX | Microsoft Learn
measure =
CALCULATE ( SUM ( 'table'[value] ), EDATE ( 'table'[date], -12 ) )
if not right, can you share a simple data and the result what you want to output?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.