Data on previously deleted element?
Posted: Tue Feb 26, 2013 12:09 am
Hi,
I have a rather odd problem that's got me stumped, if anyone can help please?
I am running an allocation via a TI script, that loops through a WHILE statement to collect values against elements in a dimension and uses the total value as a basis to allocate expenses.
However, when it adds the values together it appears to be including a value against an element that is no longer there! It's not in my list of elements and I can't see it in any cube views, dimension editor, or any of the control cubes I am aware of, and it's not in the view that feeds my TI - but when I export to an ASCII file the values used in the TI I can see it. It is against an element that one of our users uploaded data into via a DBSW, and it has since been deleted - or so I thought.
Not sure if that makes any sense or not?
Here is the TI code that cycles through my dimension and collects all the values :-
___________________-
___________________-
After this, I put in an ASCIIOUTPUT function to export the collected data into a text file and received the following list of elements and values :-
0 21,511,719
1 -924,287
2 8,793
6 -1,289,906
9 -172,111
10 -117,597
14 -25,189
16 3,025,284
20 -2,190,134
21 -29,840
23 -45,871
25 -108,874
26 1,517
28 -12,165
34 -490,735
37 -3,237,779
38 -1,114,513
39 -2,405
41 886,857
45 5,616
52 -187,621
54 -5,897,740
60 -2,626,687
61 -24,308
64 -789,179
70 -37,050
85 -552,419
87 -417,158
88 -491,913
97 -321,891
170 -3,724,618
270 -18,176,458
290 -1,886,787
300 -2,212,326
MSS -3,997,008 ***
N/A -76,070
The element "MSS" holding a value of £3997 - on the face of it - does not exist in the Scheme dimension. It used to, but was removed some time ago so I can't understand why my TI code would be picking it up. Am I missing something obvious?
Thanks
I have a rather odd problem that's got me stumped, if anyone can help please?
I am running an allocation via a TI script, that loops through a WHILE statement to collect values against elements in a dimension and uses the total value as a basis to allocate expenses.
However, when it adds the values together it appears to be including a value against an element that is no longer there! It's not in my list of elements and I can't see it in any cube views, dimension editor, or any of the control cubes I am aware of, and it's not in the view that feeds my TI - but when I export to an ASCII file the values used in the TI I can see it. It is against an element that one of our users uploaded data into via a DBSW, and it has since been deleted - or so I thought.
Not sure if that makes any sense or not?
Here is the TI code that cycles through my dimension and collects all the values :-
___________________-
Code: Select all
s_CubeName='Reporting_Scheme';
s_DimName='Scheme';
s_Alloctype= ATTRS('Nominal',Nominal,'Alloc Type');
s_AllocBasis= ATTRS('Nominal',Nominal,'Alloc Basis');
s_AllocScheme= ATTRS('Scheme',Scheme,'Alloc '|s_Alloctype);
s_AllocDest = 'AA_Alloc';
# Process:-
# ================= Loop through Schemes to collect total allocation value ==============================
n_Limit=DIMSIZ(s_DimName);
n_Counter=1;
n_TotalValue=0;
WHILE(
n_Counter<=n_Limit);
s_ElementName=DIMNM(s_DimName,n_Counter);
IF(
ELLEV(s_DimName,s_ElementName)=0 & ATTRS('Scheme',s_ElementName,'Alloc '|s_Alloctype)@<>'N');
IF(s_AllocBasis@='Alloc CurrentAccYear');
n_TotalValue=n_TotalValue + CellGetN(s_CubeName,Version,v_AccidentYear,'All Underwriting Years',LineOfBusiness,Company,'All Cover
Types',
'All Products',s_ElementName,s_AllocBasis,v_Period,v_Year);
ELSE;
n_TotalValue=n_TotalValue + CellGetN(s_CubeName,Version,'All Acc Years','All Underwriting Years',LineOfBusiness,Company,'All Cover
Types',
'All Products',s_ElementName,s_AllocBasis,v_Period,v_Year);
ENDIF;
ENDIF;
n_Counter = n_Counter + 1;
END;
After this, I put in an ASCIIOUTPUT function to export the collected data into a text file and received the following list of elements and values :-
0 21,511,719
1 -924,287
2 8,793
6 -1,289,906
9 -172,111
10 -117,597
14 -25,189
16 3,025,284
20 -2,190,134
21 -29,840
23 -45,871
25 -108,874
26 1,517
28 -12,165
34 -490,735
37 -3,237,779
38 -1,114,513
39 -2,405
41 886,857
45 5,616
52 -187,621
54 -5,897,740
60 -2,626,687
61 -24,308
64 -789,179
70 -37,050
85 -552,419
87 -417,158
88 -491,913
97 -321,891
170 -3,724,618
270 -18,176,458
290 -1,886,787
300 -2,212,326
MSS -3,997,008 ***
N/A -76,070
The element "MSS" holding a value of £3997 - on the face of it - does not exist in the Scheme dimension. It used to, but was removed some time ago so I can't understand why my TI code would be picking it up. Am I missing something obvious?
Thanks