Forum Discussion
Previous Year to Date until certain Date.
What measures have you written?
Ashish, i have this measures:
#MTD = CALCULATE([TOTAL SALES],
DATESBETWEEN(Calendar[Date],
FIRSTDATE(DATEADD(Calendar[Date],0,MONTH)),
IF(MONTH(MIN(Calendar[Date])) = MONTH(MAX(Calendar[Date])),EDATE(MAX(Calendar[Date]),0), LASTDATE(DATEADD(Calendar[Date],0,MONTH)))))
#MTD-1 = IF([TOTAL SALES] = BLANK(), BLANK(),
CALCULATE([Ventas Selecc],
DATESBETWEEN(Calendar[Date],
FIRSTDATE(DATEADD(Calendar[Date],-12,MONTH)),
IF(MONTH(MIN(Calendar[Date])) = MONTH(MAX(Calendar[Date])),EDATE(MAX(Calendar[Date]),-12), LASTDATE(DATEADD(Calendar[Date],-12,MONTH))))))
The MTD-1 It must meet the same conditions as the "New Measure" you gave me for the Previous YTD.
- jmolina4 years agoFrequent Visitor
Asish, any idea?
- Ashish_Mathur4 years ago
Super User
Hi,
I have off this thread for a while. Shar some data, describe the question and show the expected result.
- jmolina4 years agoFrequent Visitor
I cannot find a solution, i just re devolped everything, and calculate " PER CATEGORY" then just SUM by part, so in that way i can handle the date problem.
Regards