Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

TM1 Rules

Why TM1 Rules.
by

Yan Feng

on 8 March 2010

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of TM1 Rules

Why TM1 is Fast
Without
Rules
Consolidations
Child
Grandparent
Parent
Parent
Child
Child
Grandparent
Child
Child
Child
RULES
N Level Rules
=
*
Feeding Problem
Feed All the Time
SkipCheck;
Feeders
#####
SkipCheck;
['Revenue'] = ['Unit Sold'] * ['Unit Price'];

Feeders;
['Unit Sold'] => ['Revenue'];
#####
#####
SkipCheck;
['Gross Profit'] = ['Revenue'] - ['Cost of Goods Sold'];

Feeders;
['Revenue'] => ['Gross Profit'];
['Cost of Goods Sold'] => ['Gross Profit'];
#####
#####
SkipCheck;
['Revenue'] = ['Unit Sold'] * ['Unit Price'];
['Cost of Goods Sold'] = ['Unit Sold'] * ['Unit Cost'];
['Gross Profit'] = ['Revenue'] - ['Cost of Goods Sold'];

Feeders;
['Unit Sold'] => ['Revenue'];
['Unit Sold'] => ['Cost of Goods Sold'];
['Unit Sold'] => ['Gross Profit'];
#####
Why not Unit Price?
Feed From the Least
N vs C vs S
#####
# Gross Profit is a Consolidation of
# Revenue and Cost of Goods Sold
SkipCheck;
['Revenue'] = ['Unit Sold'] * ['Unit Price'];
['Cost of Goods Sold'] = ['Unit Sold'] * ['Unit Cost'];

Feeders;
['Unit Sold'] => ['Gross Profit'];
#####
Feeders Feeds N Elements Only
#####
SkipCheck;
['North America'] = C:['United States'];
['World'] = C:ConsolidateChildren('Region');
#####
Where are the feeders?
Don't use ConsolidateChildren if you can help it
#####
SkipCheck;
FeedStrings;
['Comment'] = S:'No Comment';
#####
Don't forget AllowSeparateNandCRules=T
Why ConsolidateChildren?
Conditional Feeders
#####
SkipCheck;
['Budget', 'January'] =
DB('Cube',
ATTRS('Version', 'Budget', 'Current LE'),
ATTRS('Year', !Year, 'Prev Year'),
'December',
!Measure);

Feeders;
['December'] =>
DB('Cube',
IF(ATTRS('Version', 'Budget', 'Current LE') = !Version, 'Budget', ''),
ATTRS('Year', !Year, 'Next Year'),
'January',
!Measure);
#####
Why ReevaluateConditionalFeeders=T won't help
Pitfalls
Memory Bloat
Performance Hit
Maintenance Nightmare
Why Rules?
Performance
Memory Footprint
Maintenance
Real Time
Does not take up space until accessed
Does not overwrite data
Rule Tracer
Cannot be overwritten
Feeder Processing
Too many conditions/statements
Feeders
MaximumCubeLoadThreads > 1
Source Use Case
SkipCheck;
['Effective'] = N:
IF(['Manual Input'] > 0, ['Manual Input'], ['Default']);
Flexibility
Calculates New Element Automatically
Attributes Rules
#####
SkipCheck;
['Result'] =
IF(ATTRS('Expression', !Expression, 'Operator') @= '*',
['Operand 1'] * ['Operand 2'],
CONTINUE);
['Result'] =
IF(ATTRS('Expression', !Expression, 'Operator') @= '/',
['Operand 1'] \ ['Operand 2'],
CONTINUE);
['Result'] =
IF(ATTRS('Expression', !Expression, 'Operator') @= '+',
['Operand 1'] + ['Operand 2'],
CONTINUE);
['Result'] =
IF(ATTRS('Expression', !Expression, 'Operator') @= '-',
['Operand 1'] - ['Operand 2'],
CONTINUE);
Locking Considerations?
Smarter Attributes
['Year'] = S: SUBST(!SynergyPeriod, 1, 4);

['OneYearPrior'] = S:
STR(NUMBR(SUBST(!SynergyPeriod, 1, 4)) - 1, 4, 0)
| SUBST(!SynergyPeriod, 5, LONG(!SynergyPeriod) - 4);
['OneYearAfter'] = S:
STR(NUMBR(SUBST(!SynergyPeriod, 1, 4)) + 1, 4, 0)
| SUBST(!SynergyPeriod, 5, LONG(!SynergyPeriod) - 4);

['OneMonthPrior'] = S:
IF(DTYPE('SynergyPeriod', !SynergyPeriod) @= 'N',
IF(SUBST(!SynergyPeriod, 6, 2) @= '01',
SUBST(ATTRS('SynergyPeriod', !SynergyPeriod, 'OneYearPrior'), 1, 4) | '-12',
SUBST(!SynergyPeriod, 1, 5) | SUBST('0', 1, 2 - LONG(STR(NUMBR(SUBST(!SynergyPeriod, 6, 2)) - 1, 1, 0)))
| STR(NUMBR(SUBST(!SynergyPeriod, 6, 2)) - 1, 1, 0)),
STET);
['OneMonthAfter'] = S:
IF(DTYPE('SynergyPeriod', !SynergyPeriod) @= 'N',
IF(SUBST(!SynergyPeriod, 6, 2) @= '12',
SUBST(ATTRS('SynergyPeriod', !SynergyPeriod, 'OneYearAfter'), 1, 4) | '-01',
SUBST(!SynergyPeriod, 1, 5) | SUBST('0', 1, 2 - LONG(STR(NUMBR(SUBST(!SynergyPeriod, 6, 2)) + 1, 1, 0)))
| STR(NUMBR(SUBST(!SynergyPeriod, 6, 2)) + 1, 1, 0)),
STET);
Dim Builders to the Rescue
Constant Cube
ObjectManifestFileName = CellGetS(ConstantCube, 'BTI Manifest Object File', 'SValue');
ObjectGenerationFileName = CellGetS(ConstantCube, 'BTI Manifest Object Generation File', 'SValue');
GeneratedCreationFileName =CellGetS(ConstantCube, 'BTI Manifest Generated Creation File', 'SValue');
GeneratedDeletionFileName =CellGetS(ConstantCube, 'BTI Manifest Generated Deletion File', 'SValue');
InputDirectory = CellGetS(ConstantCube, 'Import Directory', 'SValue');
OutputDirectory = CellGetS(ConstantCube, 'Export Directory', 'SValue');
TempDirectory= CellGetS(ConstantCube, 'Temp Directory', 'SValue');
DataDirectory= CellGetS(ConstantCube, 'Data Directory', 'SValue');

ObjectExtractFileName = CellGetS(ConstantCube, 'BTI Manifest Extract File', 'SValue');
ObjectFileHeaderCount = CellGetN(ConstantCube, 'BTI Manifest Object File Header Count', 'NValue');
ObjectFileDelimiter = CellGetS(ConstantCube, 'BTI Manifest Object File Delimiter', 'SValue');
ObjectFileQuoteCharacter = CellGetS(ConstantCube, 'BTI Manifest Object File Quote Character', 'SValue');
InclusionExtension = CellGetS(ConstantCube, 'BTI Manifest Object Inclusion Extension', 'SValue');
ExclusionExtension = CellGetS(ConstantCube, 'BTI Manifest Object Exclusion Extension', 'SValue');
Every Constant relevent to the server should sit here
Not in Code
Smarter Constant Cube
Never manually input the same value twice
RULES!
Unpredictable
Zero Supression
ConsolidateChildren
Design
Considerations
Store input data in a cube tightly
Rules sometimes need room to work
Readable rules are flexible and maintainable
Measure Use Case
Easy to Write
AKA ForceReevaluationOfFeedersForFedCellsOnDataChange
Feeds
Feeds Conditionally
Feeds
Feeds Conditionally
Condition Changed, Then B became Fed
A
B
A
B
Full transcript