|
发表于 2014-6-28 22:59:39
|
显示全部楼层
tez wrote:Hi
We have a TI process that currently extracts all natural accounts entries over each month for a year from a cube view. Currently the extract includes all values, no matter if they are zero or not.
I am trying to get the output file that includes a line for the natural account for each month & full year total if there is a value somewhere in at least one month, even if it is an in & out transaction over different months, so if say, $1,000 is shown in Jul, but -$1,000 is shown in Aug, with a full year total of $0, we still need the line to appear in the extract.
I am having trouble finding how to do this, within the one TI process. I have basic knowledge of TI Processes - this process was written by an ex employee, & I am trying to modify it to get it working properly. Originally, it was only extracting natural account lines with values in them, & I have included the ViewExtractSkipZeroesSet to now include zeroes. I just need it to go that extra step!
Greatly appreciate any help on this.
Regards & many thanks
Terri
Think it sounds like you are using an asciioutput() on the data tab of your process?
In order to show:
Months where the value <> 0
Full Year where the value of any child month <> 0
I would simply have ViewExtractSkipZeroesSet to 0 (i.e. show all rows regardless of whether there is a value or not)
Then add the following at the top of your data tab (and/or metadata if you are doing similar things in there)
Code: If ( DTYPE ( 'Month', vMonth ) @= 'N' );
If ( Value <> 0 );
nSkip = 0;
Else;
nSkip = 1;
EndIf;
Else;
nSkip = 1;
iCount = 1;
iMax = 12;
While ( iCount <= iMax );
sMonth = ElComp ( 'Month', vMonth, iCount );
If ( CellGetN ( sCub, v1, sMonth, v3, v4, v5 )<>0);
nSkip = 0;
iCount = 12;
EndIf;
iCount = iCount + 1;
End;
EndIf;
If ( nSkip = 1 );
ItemSkip;
EndIf;
sCub is the cube in your data source.
vMonth is the variable of your month dimension
v1, v3, v4, v5 are the other variables (assuming its a 5 dim cube and month is dim 2)
HTH |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|