TM1Last720SubsetSetup - edorlando07/datasciencecoursera GitHub Wiki
This code creates a long string that loops through each of the 720 lines and changes the date
for item in range(1,721):
print \
"PD" \
+ str(item) \
+ "=NUMBERTOSTRING(TIMVL(NOW()-" \
+ str(item) \
+ ",'Y'))| IF(LONG(NUMBERTOSTRING(TIMVL(NOW()-" \
+ str(item) \
+ ",'M')))=1,'0'|NUMBERTOSTRING(TIMVL(NOW()-" \
+ str(item) \
+ ",'M')),NUMBERTOSTRING(TIMVL(NOW()-" \
+ str(item) \
+ ",'M')))|IF(LONG(NUMBERTOSTRING(TIMVL(NOW()-" \
+ str(item) \
+ ",'D')))=1,'0'|NUMBERTOSTRING(TIMVL(NOW()-" \
+ str(item) \
+ ",'D')),NUMBERTOSTRING(TIMVL(NOW()-" \
+ str(item) \
+ ",'D')));"