Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

YTD calculation

Status
Not open for further replies.

reacha

Programmer
Jun 9, 2010
83
US
I am creating a measure in the universe as current YTD.

I have created the Individual month measures for 2011 and 2012.
like there are two folders 2011 and 2012 and in that they are month measures from jan to dec.

2011
-----
JAN-11,FEB-11,MAR-11,APR-11,MAY-11,JUN-11,JUL-11,AUG-11,SEP-11,OCT-11,NOV-11,DEC-11

2012
----
JAN-12,FEB-12,MAR-12,APR-12,MAY-12,JUN-12,JUL-12,AUG-12,SEP-12,OCT-12,NOV-12,DEC-12

now when i try to calculate the current YTD as JAN-11+FEB-11+MAR-11+APR-11..

i don't know what happens when the year changes that is in next jan(how can i change that to look for measures of 2012)


and there are 3 items like bal,con,ft

Current YTD
------------------
case when item = bal then jan-11*31+feb-11*28+-------------+oct-11*31/(31+28---+31)
when item = con then jan-11+feb-11+----------+oct-11
when item = ft then oct-11
end

Please help me out!!

Thanks,
reacha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top