Page 1 of 1

Archiving Data in the same Cube

Posted: Fri Jan 31, 2020 11:54 am
by engineerairborne
This is my first time posting, I am new to Planning Analytics and I am still learning. I am working with Code that a consulting company put in place that is not functioning, and I am looking for help fixing the code. I am using Planning Analytics 2.0.4

We have a cube with a Year dimension that with 1 dimension Current Year. The TurboIntegrator process creates a new Year Dimension in this case Operating Budget 2020. It is suppose to take all of the measures from Current Year, and place them in Operating Budget 2020 to close out that years budget so we can start 2022's budget in the Current Year dimension. Many of the measures are defined by rules I bring this up because when running the code as designed, the intersections that are created with rules are left blank. So looking at the Turbointegrator code in the prolog there are these commands

ViewExtractSkipZeroesSet (vCube, vView, 1);
ViewExtractSkipCalcsSet (vCube, vView, 1);
ViewExtractSkipRuleValuesSet (vCube, vView, 1);

Looking at the third command it makes sense why the intersections defined by rules are not coming over, the code explicitly says to skip them. So thinking this is an easy fixes I change that to ViewExtractSkipRuleValuesSet (vCube, vView, 0); This causes a bunch of errors and no data comes over.

Here is the Data portion of the Turbointegrator process

#****Begin: Generated Statements***
MeasureType=DTYPE('mOperatingInput',mOperatingInput);
#****End: Generated Statements****

IF(MeasureType@='N');
CELLPUTN(NUMBR(Value),vCube,Version,pArchiveYear,TimeMonth,Department,Project,NumberedList,Account,mOperatingInput);
ELSE;
CELLPUTS(Value,vCube,Version,pArchiveYear,TimeMonth,Department,Project,NumberedList,Account,mOperatingInput);
ENDIF;


Example of errors
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","42915","Comments","See Account Detail",Data Source line (4694) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","50981","Comments","See Account Detail",Data Source line (4788) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","51020","Comments","See Account Detail",Data Source line (4796) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","51022","Comments","See Account Detail",Data Source line (4804) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","51100","Comments","See Account Detail",Data Source line (4810) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","51105","Comments","See Account Detail",Data Source line (4816) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","51200","Comments","See Account Detail",Data Source line (4820) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","51300","Comments","See Account Detail",Data Source line (4828) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","51320","Comments","See Account Detail",Data Source line (4834) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","51769","Comments","See Account Detail",Data Source line (4843) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52030","Comments","See Account Detail",Data Source line (4852) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52120","Comments","See Account Detail",Data Source line (4857) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52122","Comments","See Account Detail",Data Source line (4862) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52151","Comments","See Account Detail",Data Source line (4870) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52156","Comments","See Account Detail",Data Source line (4878) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52165","Comments","See Account Detail",Data Source line (4886) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52291","Comments","See Account Detail",Data Source line (4894) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52331","Comments","See Account Detail",Data Source line (4902) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52333","Comments","See Account Detail",Data Source line (4908) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52360","Comments","See Account Detail",Data Source line (4914) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52390","Comments","See Account Detail",Data Source line (4918) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52501","Comments","See Account Detail",Data Source line (4932) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52670","Comments","See Account Detail",Data Source line (4938) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","52900","Comments","See Account Detail",Data Source line (4946) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","58140","Comments","See Account Detail",Data Source line (4954) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","58150","Comments","See Account Detail",Data Source line (4960) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","58451","Comments","See Account Detail",Data Source line (4969) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","152000","6220000","TOTAL LIST","58600","Comments","See Account Detail",Data Source line (4978) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","184612","1003510","TOTAL LIST","50760","Comments","See Account Detail",Data Source line (9415) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","184614","1003510","TOTAL LIST","50760","Comments","See Account Detail",Data Source line (9986) Error: Data procedure line (9): Rule applies to cell
"Requested Budget","Current Year","Input","184617","1003510","TOTAL LIST","50760","Comments","See Account Detail",Data Source line (10231) Error: Data procedure line (9): Rule applies to cell

Re: Archiving Data in the same Cube

Posted: Fri Jan 31, 2020 12:32 pm
by Steve Rowe
Your TI is erroring because your source version and target version are both subject to the same set of rules hence when you copy ruled values from the source into the target they can not be written to the rule based cells.

You might be better off taking a step back and letting us know what is going wrong with the source code that you need to fix. Unless the requirements have changed the source code should not need to.

Cheers,

Re: Archiving Data in the same Cube

Posted: Fri Jan 31, 2020 12:40 pm
by engineerairborne
The reason that I am trying to implement a change to the code is because it is not archiving the rule based data. The intersections were data is rule based in the original code come back as blank. This is because in the rule as written by the same contractor is has this line at the start.
[] = N:IF(ATTRS('Year',!Year,'Archive')@='Y',STET,Continue);

This line says to ignore the rules for the Years that are archived, and that is working correctly as when running the turbointegrator code unchanged no rules are applied, and many of the values that we want to archive that were created from a rule, are left blank. What we want is those values that were created by a rule, to be hardcode in the archive version so they can't change over time.

Re: Archiving Data in the same Cube

Posted: Fri Jan 31, 2020 2:12 pm
by David Usherwood
Don't skip ruled values?

Code: Select all

ViewExtractSkipRuleValuesSet (vCube, vView, 0);

Re: Archiving Data in the same Cube

Posted: Fri Jan 31, 2020 2:19 pm
by engineerairborne
David Usherwood wrote: Fri Jan 31, 2020 2:12 pm Don't skip ruled values?

Code: Select all

ViewExtractSkipRuleValuesSet (vCube, vView, 0);
That is the code change that I made that caused the errors that I have listed above. How do I not skip rules but not get errors such as
"Requested Budget","Current Year","Input","184617","1003510","TOTAL LIST","50760","Comments","See Account Detail",Data Source line (10231) Error: Data procedure line (9): Rule applies to cell”

Re: Archiving Data in the same Cube

Posted: Fri Jan 31, 2020 2:53 pm
by engineerairborne
I figured it out. In the rule, it included all Year Dimensions. I had to update each rule to only include the Current year, so that the new Dimension was not part of the rule. Even though the [] = N:IF(ATTRS('Year',!Year,'Archive')@='Y',STET,Continue); this causes rules not to be applied to these Archive Year dimensions, I believe that turbointegrator still designated these intersections as being filled by rules. Once I updated all of the rules everything ran.

Re: Archiving Data in the same Cube

Posted: Fri Jan 31, 2020 3:10 pm
by tomok
I'm not going to get into the details but the order of where rule statements appear in the list make a huge difference. In order for this rule to work properly:

Code: Select all

[] = N:IF(ATTRS('Year',!Year,'Archive')@='Y',STET,Continue)
it would most likely need to be the first line in the rule file, right after #SKIPCHECK.