Tm1 Rule - Feeders for Current Rule
Posted: Mon Jan 28, 2019 5:52 pm
Hi ,
I am creating an averageCFYTD rule in my exchange rates cube dimension .
All it does is , checks the current month and say if it is august 2018 , then it takes June 2018 rate +July 2018 rate +August 2018 rate and divides by 3 and gets a rate .
I have the below rule , can anyone tell me how the feeders should look , I will be having 12 nested if statements in my rule based on month number . I am just showing 1. Below is showing for July month- takes 201812 - june rate + 201901 July rate and divides by 2
['AverageCFYTDRate']=N:if(Month(Date((DayNo(Today(1))-1),1))=7,(DB('Exchange Rates','Actual',!Currencies,'USD','Ending Rate',STR(Year(Date((DayNo(Today(1))-1),1)),4,0)|'12')+DB('Exchange Rates','Actual',!Currencies,'USD','Ending Rate',STR(Year(Date((DayNo(Today(1))-1),1))+1,4,0)|'01'))/2,0);
Any help is appreciated .
I am creating an averageCFYTD rule in my exchange rates cube dimension .
All it does is , checks the current month and say if it is august 2018 , then it takes June 2018 rate +July 2018 rate +August 2018 rate and divides by 3 and gets a rate .
I have the below rule , can anyone tell me how the feeders should look , I will be having 12 nested if statements in my rule based on month number . I am just showing 1. Below is showing for July month- takes 201812 - june rate + 201901 July rate and divides by 2
['AverageCFYTDRate']=N:if(Month(Date((DayNo(Today(1))-1),1))=7,(DB('Exchange Rates','Actual',!Currencies,'USD','Ending Rate',STR(Year(Date((DayNo(Today(1))-1),1)),4,0)|'12')+DB('Exchange Rates','Actual',!Currencies,'USD','Ending Rate',STR(Year(Date((DayNo(Today(1))-1),1))+1,4,0)|'01'))/2,0);
Any help is appreciated .