DIMIX rule calculation
Posted: Tue Jan 08, 2013 10:07 am
Hi,
I want to calculate the movement between days. I am using the DIMIX formula and all is working fine.
What I picked up now was that for the last day in each month it takes the total for the previous month to do the calculation because for eaxmple Feb 28 dimix = 37 and Total Jan = 36 and and January 31 = 35.
My formule uses 37 and 36. I need to somehow skip 36 and use 35.
If the DIMIX -1 = consolidater, then DIMIX -2.
Any help please?
My current formula below:
['Stock']=N:
DB('Stock Plan',dimnm('Date',(dimix('Date',!Date)-1)),!Version,!Depot,!Product,'Stock')+
DB('Stock Plan',dimnm('Date',(dimix('Date',!Date)-1)),!Version,!Depot,!Product,'Delivery')-
DB('Stock Plan',dimnm('Date',(dimix('Date',!Date)-1)),!Version,!Depot,!Product,'Sales');
My thinking is something like this but it doent make sense:
['Stock']=N:
DB('Stock Plan',IF(dimnm('Date',(dimix('Date',!Date)-1)<>ELLEV(('Date',!Date)=0,dimnm('Date',(dimix('Date',!Date)-2))),!Version,!Depot,!Product,'Stock')+
I want to calculate the movement between days. I am using the DIMIX formula and all is working fine.
What I picked up now was that for the last day in each month it takes the total for the previous month to do the calculation because for eaxmple Feb 28 dimix = 37 and Total Jan = 36 and and January 31 = 35.
My formule uses 37 and 36. I need to somehow skip 36 and use 35.
If the DIMIX -1 = consolidater, then DIMIX -2.
Any help please?
My current formula below:
['Stock']=N:
DB('Stock Plan',dimnm('Date',(dimix('Date',!Date)-1)),!Version,!Depot,!Product,'Stock')+
DB('Stock Plan',dimnm('Date',(dimix('Date',!Date)-1)),!Version,!Depot,!Product,'Delivery')-
DB('Stock Plan',dimnm('Date',(dimix('Date',!Date)-1)),!Version,!Depot,!Product,'Sales');
My thinking is something like this but it doent make sense:
['Stock']=N:
DB('Stock Plan',IF(dimnm('Date',(dimix('Date',!Date)-1)<>ELLEV(('Date',!Date)=0,dimnm('Date',(dimix('Date',!Date)-2))),!Version,!Depot,!Product,'Stock')+