EIGENN.
docsguidesapichangelogpricingsign in
EIGENN.

Conditionals

Choose between two results with if, then, and else, and build tests with comparisons, and, or, not, and in.

A conditional gives one result when a test is true and a different result when the test is false. Use it for thresholds, start and end dates, seasonal months, and start values.

1. Write the conditional

Use this form:

if <test> then <result> else <result>

The else part is necessary. Without it, the formula bar shows Expected "else".

if Revenue > 100000 then Revenue * 0.05 else 0

The Conditional flag template inserts if {condition} then 1 else 0.

2. Compare values

OperatorTrue when
=The values are equal
<>The values are not equal. != has the same meaning
<The left value is less
<=The left value is less or equal
>The left value is greater
>=The left value is greater or equal

A comparison gives 1 when it is true and 0 when it is false. You can use that number directly:

(Revenue > 100000) * Bonus pool

A value can also be the test. A value that is not 0 is true. 0 is false.

You cannot chain comparisons. Write Price > 10 and Price < 20, not 20 > Price > 10.

3. Join tests

KeywordResult
andTrue when both tests are true
orTrue when one test or both tests are true
notReverses the test that follows

Eigenn applies not first, then and, then or. Use parentheses to make the order clear.

if timeStep >= Start step and (timeStep <= End step or End step = blank) then 1 else 0

Start step and End step are variables that hold time steps. For example, Start step can use the formula date(2027, 1). The formula gives 1 from the start step onward. It stops after the end step, or continues when End step is blank. The Active in period template inserts this form.

4. Test a list of values

Use in with a list in square brackets. Use not in for the opposite test.

if month in [11, 12] then Holiday uplift else 1
if month not in [6, 7, 8] then Base hours else Summer hours

month is a built-in helper. It gives the calendar month of the period, from 1 to 12.

5. Test more than two cases

Put a second if after else. Press Shift+Enter in the formula bar to put each case on its own line.

if Revenue >= 150000 then 0.10
else if Revenue >= 100000 then 0.05
else 0

Eigenn checks the tests from top to bottom. It uses the first test that is true.

6. Know how blank values behave

  • = and <> treat blank as a value. if End step = blank then ... works.
  • <, <=, >, and >= with a blank value give a blank result.
  • When the test is blank, the whole conditional is blank. Eigenn uses neither result.
  • or gives true when one side is true, also when the other side is blank.
  • and gives false when one side is false, also when the other side is blank.

To use a start value in the first period, test for blank:

if Customers[previous] = blank then Starting customers else Customers[previous] + New customers

The Blanks and helpers page explains when a value is blank.

7. Test the period or the item

  • Use the helpers month, quarter, year, and timeStep to test the period.
  • Use lastActualDate to separate actual periods from forecast periods: if timeStep <= lastActualDate then ... else ....
  • In a variable that is broken down by a dimension, test the item: if Region = Europe then ... else .... The Dimension references page explains this test.

Related

  • Formula syntax
  • Blanks and helpers
  • Time references
  • Dimension references
  • Common seasonality formulas
  • Troubleshoot formulas

Compare versions

Preview a saved version, check if it is comparable with the live model, and compare it with actuals in a table.

Connect a data source

Add a planning data source from the Data sources catalog and wait for its first refresh.

On this page

1. Write the conditional2. Compare values3. Join tests4. Test a list of values5. Test more than two cases6. Know how blank values behave7. Test the period or the itemRelated

Eigenn docs

current product

Overview
Overview
OverviewAccount PreferencesApproval PoliciesAssistant AutomationAssistant Command CenterAssistant Workspace and Saved WorkBank ConnectionsBilling and UsageBudgets and ForecastCommand CenterCustomer FieldsCustomer LifecycleCustomer RecordsCustomersDeveloper PlatformDocument Processing and ExtractionFiles and Document VaultFinancial Analytics and ReportsFinancial OverviewInbox and ApprovalsInvoice InsightsInvoice ProductsInvoicesMarketplace IntegrationsNotifications and BrandingOnboarding and SupportOverviewPlanning Data and DimensionsPlanning Models and FormulasPlanning Time and ActualsPlanning UncertaintyPlanning Versions and CollaborationPlanning Views and ExportsPlans and AdjustmentsReceivablesReceivables AnalyticsReceivables ControlsRolling Budget CloseScenario PlanningSecurity and AccessSettings OverviewStress TestsTeams and OrganizationsTone Profiles and ExperimentsTransaction Categories and RulesTransaction CodingTransactionsWeekly Finance RitualWorkflow ExecutionsWorkflow OutcomesWorkflow PausesWorkflows
OverviewBudget vs. ActualsBuild a Driver-Based Planning ModelBuild and Review a ForecastBuild Your First WorkflowCollaborate on a Planning ModelCompare and Share Planning ScenariosConfigure Approval PoliciesConfigure Assistant OperationsConfigure Customer FieldsConfigure Notifications and BrandingConfigure Planning Time and ActualsConfigure Receivables ControlsConnect Planning Data and ActualsConnect Transaction RecordsConsolidationCreate and Manage CustomersCreate and Send InvoicesCreate Your First Planning ModelDeveloper API SetupFirst Cash ReviewHeadcount PlanningInvoice Collection WorkflowMaintain Transaction RulesManage Security and BillingManage Team AccessManage the Invoice LifecycleMCP WorkflowsMonitor and Recover WorkflowsOrganize and Share DocumentsProcess Inbox ItemsReconcile and Categorize TransactionsRevenue ForecastingReview a Customer Finance RecordReview, Restore, and Export a Planning ModelRun a Finance Operating ReviewRun a Receivables Tone ExperimentRun a Runway Stress TestRun Planning Uncertainty AnalysisRun Your First Command Center ReviewSave and Share Assistant WorkSet Up a WorkspaceTroubleshoot Account AccessWebhook DeliveryWeekly CFO Review
Overview

Concepts

DataDimensionsFormulasScenarios

Variables

VariablesChange an input over timeCreate a variableFormat a variableOrganize variablesTime totalsUse a variable from another modelVariable types

Time

TimeLast actual dateRoll the model forwardTime granularityTime settings

Formulas

FormulasBlanks and helpersCommon formulas: cash and balance sheetCommon formulas: cohortsCommon formulas: currency and multiple entitiesCommon formulas: headcount and payrollCommon formulas: SaaS metricsCommon formulas: seasonalityConditionalsDimension referencesFormula syntaxFunctionsTime referencesTroubleshoot formulasValues with uncertaintyWrite a formula

Charts and Dashboards

Charts and dashboardsCompare scenarios and versionsCreate a chartExport and shareTablesTime aggregation in charts

Dimensions

DimensionsApply a dimensionCreate a dimensionDimension examplesDimension totalsThe Dimensions page

Data

DataChoose cash or accrual for XeroConnect a data sourceLink a variable to dataRefresh and check actualsUse transaction categories as actuals

Data Integrations

Data integrationsBank transactionsCSV importFortnoxQuickBooksStripeXero

Views

ViewsCreate and edit a viewFilter a viewShare a view

Versions

VersionsCompare versionsRestore a versionSave a version

Scenarios

ScenariosCompare scenariosCreate a scenarioPlans and adjustmentsStress tests and shocks

Collaboration

CollaborationComment on a modelShare a model and set accessTeam roles and planning access

Managing Models

Managing modelsDuplicate a modelExport a modelModel limits and performanceStart from a templateThe models home and foldersTrash, restore, and delete a model
OverviewIntegrationsMCPSDKsWebhooks
OverviewAuthenticationBank Accounts APICustomers APIErrorsForecasts and Stress Tests APIInvoice Payments APIInvoices APIPaginationRate LimitsRemote Tracker API StatusTracker Categories APITracker Entries and Timers APITracker Projects APITransactions APIWebhooks API StatusWorkflows API
Overview
Overview