Forum Discussion
kisti_ps
7 years agoNew Member
DAX
I have data like this : Date Unit Sales Jan-97 63 Feb-97 26 Mar-97 20 Apr-97 41 May-97 83 Jun-97 40 Jul-97 88 Aug-97 95 Sep-97 74 Oct-97 67 Nov-97 52 ...
ibarrau
Super User
7 years agoHi. First of all you need to understand that any time intelligence calculations work with a Date Table. Date table are necesary so the engine can run specific time calculations la year to date. Once you hace this data model prepared you can create a measure like this:
Measure YTD = CALCULATE ( [Measure Unit Sales], DATESYTD ( 'DateTable'[Date], "04/30" ) )
On this case the YTD will start on May 1st.
Regards,