Page 1 of 1

Data on previously deleted element?

Posted: Tue Feb 26, 2013 12:09 am
by conflax
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 :-

___________________-

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

Re: Data on previously deleted element?

Posted: Tue Feb 26, 2013 9:35 am
by conflax
Update :

I have run a DIMIX on the element in question and it returns an index value, so this at least proves it's in there somewhere. But I cannot see the element or it's index value in any viewer, with full admin security rights.

Can anyone help pls?

Thanks

Re: Data on previously deleted element?

Posted: Tue Feb 26, 2013 9:51 am
by conflax
SOLVED

Please ignore message

Thanks

Re: Data on previously deleted element?

Posted: Tue Feb 26, 2013 10:14 am
by Alan Kirk
conflax wrote:SOLVED
Please ignore message
Might be useful for anyone searching and finding this thread to know how it was solved.

Would I be going not too far out on a limb and guessing that the element that you thought had been deleted was in fact the alias for another element, and that you couldn't see it because the alias was not selected when you were in the Dimension Editor which meant that you couldn't find it?

(That would have been my guess had I had time to read through the full question earlier than this.)

Re: Data on previously deleted element?

Posted: Tue Feb 26, 2013 1:46 pm
by tomok
My guess is he didn't really delete the element. When using the dimension editor, if you have a child under a parent, and you click on the child element underneath the parent and then hit the delete button, all it does is remove the child from the parent, it does not actually delete the element. It will send the element to the bottom of the dimension. You then have to find the element and delete it again. In essence, you have to delete the stupid thing twice.

Re: Data on previously deleted element?

Posted: Tue Feb 26, 2013 3:46 pm
by mattgoff
tomok wrote:My guess is he didn't really delete the element. When using the dimension editor, if you have a child under a parent, and you click on the child element underneath the parent and then hit the delete button, all it does is remove the child from the parent, it does not actually delete the element. It will send the element to the bottom of the dimension. You then have to find the element and delete it again. In essence, you have to delete the stupid thing twice.
If an element is part of a consolidation, TM1 assumes DEL is equivalent to "Delete Element from consolidation". It's the safer assumption. If you want to really delete the element in one step, you can always right-click and use the context menu.