Accepted Code Samples
OneStream approved sample code snippets and examples to help everyone write rules.

Knowledge Base Articles

Filter IC Dimension by Entity Property

A common requirement for reporting is to be able to filter the IC dimension by some property that exists only on the original Entity members. This can be achieved with a custom Member List defined in a Finance business Rule. Select Case api.FunctionT...

JackLacava_0-1704889740618.png
JackLacava by Community Manager
  • 422 Views
  • 0 comments
  • 4 kudos

Extender: Rename a dimension

This snippet will rename a dimension. Note: RenameDim does not create entries in Audit tables, which means the Audit Metadata report will not contain anything related to this operation. For this reason, we do not recommend to use this snippet outside...

OSAdmin by Valued Contributor
  • 904 Views
  • 0 comments
  • 0 kudos

Extender: Auto Update Member Property

This snippet will modify a Member property that can vary by Scenario Type and/or Time. Just pass the relevant ScenarioType ID or Time member ID to set it in a more specific way; it will then appear as a "Stored Item" in the interface. Note: SaveMembe...

OSAdmin by Valued Contributor
  • 1332 Views
  • 0 comments
  • 5 kudos

Extender: Auto Create Member

This snippet will create a new Account member, including setting some properties that can vary by Scenario Type and/or Time. Note: SaveMemberInfo does not create entries in Audit tables, which means the Audit Metadata report will not contain anything...

OSAdmin by Valued Contributor
  • 1284 Views
  • 0 comments
  • 3 kudos

Finance: Daily Revenue

An account that calculates Daily Revenue by taking three months of Total Revenue and dividing it down to a daily amount 'Calculate Daily Revenue 'Get Text1 priority from current Scenario to learn which Scenario to copy prior data from Dim priorScenar...

OSAdmin by Valued Contributor
  • 579 Views
  • 0 comments
  • 0 kudos

Finance: Annualized Revenue

This Dynamic Calc formula calculates Annualized Revenue, by taking 3 months of Total Revenue, dividing it down to a monthly amount, then multiplying it by 12. ' "Prior Scenario" must be stored as Text1 property in current Scenario Dim priorScenario A...

OSAdmin by Valued Contributor
  • 551 Views
  • 0 comments
  • 0 kudos

Finance: Return on Capital Employed

This formula calculates a financial ratio that measures a company's profitability and the efficiency with which its capital is employed. The main financial logic in the formula is EBIT / (Total Assets - Total Liabilities) Return api.Data.GetDataCell(...

OSAdmin by Valued Contributor
  • 396 Views
  • 0 comments
  • 1 kudos

Finance: Return on Total Assets

Efficiency Measure: The ratio is considered an indicator of how effectively a company is using its assets to generate earnings before contractual obligations must be paid. Formula: EBIT / Total Net Assets 'Calculate Return on Total Assets 'Formula: E...

OSAdmin by Valued Contributor
  • 459 Views
  • 0 comments
  • 1 kudos

Finance: Return on Equity

Efficiency Measure: Return on equity measures a corporation's profitability by revealing how much profit a company generates with the money shareholders have invested. Formula: ROE= Net Inocme/ Average Shareholders Equity 'Calculate Return on Equity ...

OSAdmin by Valued Contributor
  • 679 Views
  • 0 comments
  • 1 kudos

Finance: Return on Assets

Efficiency Measure: An indicator of how profitable a company is relative to its total assets. It gives an idea as to how efficient management is at using its assets to generate earnings. Formula: ROA = Net Income / Average Total Assets 'Calculate Ret...

OSAdmin by Valued Contributor
  • 498 Views
  • 0 comments
  • 1 kudos

Finance: Receivables Turnover

Efficiency Measure: The receivables turnover ratio is an activity ratio, measuring how efficiently a firm uses its assets. Formula: Net Credit Sales/ Average Accounts Receivable 'Calculate Receivables Turnover 'Formula: Net Credit Sales/ Average Acco...

OSAdmin by Valued Contributor
  • 372 Views
  • 0 comments
  • 0 kudos

Finance: Profit Margin

Efficiency Measure: The percentage of revenue remaining after all operating expenses, interest, taxesand preferred stock dividends (but not common stock dividends) have been deducted from a company's total revenue Formula: Net Profit Margin = Net Inc...

OSAdmin by Valued Contributor
  • 407 Views
  • 0 comments
  • 0 kudos

Finance: Operating Margin

Efficiency Measure: Operating margin is a measurement of what proportion of a company's revenue is left over after paying for variable costs of production such as wages, raw materials, etc. Formula: Operating Margin = Net Income / Net Sales 'Calculat...

OSAdmin by Valued Contributor
  • 400 Views
  • 0 comments
  • 0 kudos

Net Profit Percent

Efficiency Measure: It reveals the remaining profit after all costs of production, administration, and financing have been deducted from sales, and income taxes recognized. ' Calculate Net Profit Percent ' Formula: Operating Profit/Sales or Operating...

OSAdmin by Valued Contributor
  • 413 Views
  • 0 comments
  • 0 kudos

Finance: Inventory Turnover

Efficiency Measure: The Inventory turnover is a measure of the number of times inventory is sold or used in a time period such as a year. Formula: COGS/ Average Inventory 'Calculate Inventory Turnover 'Formula: Cost of Goods Sold / Average Inventory ...

OSAdmin by Valued Contributor
  • 380 Views
  • 0 comments
  • 1 kudos

Finance: Inventory period

Efficiency Measure: Inventory period is a measure of the average number of days inventory is held. Formula: Average Inventory/ (Annual COGS/365) or 365/ Inventory Turnover 'Calculate Inventory Period 'Formula: Average Inventory/ (Annual COGS/365) or ...

OSAdmin by Valued Contributor
  • 391 Views
  • 0 comments
  • 0 kudos

Finance: Gross Margin

Efficiency Measure: The gross margin represents the percent of total sales revenue that the company retains after incurring the direct costs associated with producing the goods and services sold by a company. Formula: Gross Margin Pct = Gross Profit ...

OSAdmin by Valued Contributor
  • 486 Views
  • 0 comments
  • 0 kudos

Finance: Average Collection Period

Efficiency Measure: The approximate amount of time it takes for a business to receive payments owed, in terms of receivables, from its customers and clients. Formula: Accounts Receivable/ (Annual Credit Sales/ 365) or 365/ Receivables Turnover 'Calcu...

OSAdmin by Valued Contributor
  • 325 Views
  • 0 comments
  • 0 kudos

Finance: Asset Turnover

Efficiency Measure: The Asset Turnover ratio is an indicator of the efficiency with which a company is deploying its assets. Formula: Sales / Inventory 'Calculate Asset Turnover 'Formula: Sales / Inventory Return api.Data.GetDataCell("Divide(A#[YourS...

OSAdmin by Valued Contributor
  • 351 Views
  • 0 comments
  • 0 kudos

Finance Dynamic Calc: Annotations Consolidations

This DynamicCalc formula consolidates Annotations for entities in a hierarchy. 'Cube View definition 'Row Definition: E#[Total GolfStream].tree 'Col1 Definition: V#Annotation:Name("Comment") 'Col2 Definition: V#Annotation:UD8#DynamicTextCons:Name("Co...

OSAdmin by Valued Contributor
  • 1331 Views
  • 0 comments
  • 4 kudos
Top Contributors