Hey guys,
I've gotten the logic to work okay for creating a number for each month, quarter, year in sequential order. Our Fiscal Year is from Sep through Aug which is why I have to change the first four months so the ordering works out okay... Just to show that:
Code: ['Date Order String'] = S:
IF(SUBST(!Months,1,3) @= 'Sep', STR (NUMBR ( SUBST(!Months,(LONG(!Months)-1),2) ) + 1, 2, 0 ),
IF(SUBST(!Months,1,3) @= 'Oct', STR (NUMBR ( SUBST(!Months,(LONG(!Months)-1),2) ) + 1, 2, 0 ),
IF(SUBST(!Months,1,3) @= 'Nov', STR (NUMBR ( SUBST(!Months,(LONG(!Months)-1),2) ) + 1, 2, 0 ),
IF(SUBST(!Months,1,3) @= 'Dec', STR (NUMBR ( SUBST(!Months,(LONG(!Months)-1),2) ) + 1, 2, 0 ),
SUBST(!Months,(LONG(!Months)-1),2) ))))
|
IF(SUBST(!Months,1,2) @= 'FY' , '01' ,
IF(SUBST(!Months,1,2) @= 'Q1' , '02' ,
IF(SUBST(!Months,1,3) @= 'Sep' , '03' ,
IF(SUBST(!Months,1,3) @= 'Oct' , '04' ,
IF(SUBST(!Months,1,3) @= 'Nov' , '05' ,
IF(SUBST(!Months,1,2) @= 'Q2' , '06' ,
IF(SUBST(!Months,1,3) @= 'Dec' , '07' ,
IF(SUBST(!Months,1,3) @= 'Jan' , '08' ,
IF(SUBST(!Months,1,3) @= 'Feb' , '09' ,
IF(SUBST(!Months,1,2) @= 'Q3' , '10' ,
IF(SUBST(!Months,1,3) @= 'Mar' , '11' ,
IF(SUBST(!Months,1,3) @= 'Apr' , '12' ,
IF(SUBST(!Months,1,3) @= 'May' , '13' ,
IF(SUBST(!Months,1,2) @= 'Q4' , '14' ,
IF(SUBST(!Months,1,3) @= 'Jun' , '15' ,
IF(SUBST(!Months,1,3) @= 'Jul' , '16' ,
IF(SUBST(!Months,1,3) @= 'Aug' , '17' ,
'N/A')))))))))))))))));
BUT, the real purpose of this post is to take it further.
Now, I want to say, for the 'Actual or Forecast' column, populate 'Actual' from the 'current month' all the way back otherwise, populate with "Forecast".
That way, they will populate a 'Current Period' cube each month simply with the current Mon-Yr and everything will feed off that. They won't have to go in and update "Actual or Forecast" (and I have about 20 more columns that will populate automatically if I can get this understood. Me and another coworker (we are both green and painfully learning slowly) have looked at this all morning and are coming up empty handed (we've been close) so I finally decided to post. I want to always make a diligent effort to get this on my own before posting so when I post, it's a last ditch effort. I greatly appreciate any assistance!! Thanks a lot!! |