ValQ - Plan
FormulaProductChangelogStart Trial
  • Introduction to ValQ
    • Get ValQ
    • The ValQ Workflow
  • Model
    • Get Data
    • Create Model
      • Dynamic Model
      • Custom Model
      • Import a Model
    • Model Editor
      • Node Operations
      • Editor Features
    • Node Settings
    • Templates
      • Apply Template
      • Manage Template Nodes
      • Import Template
      • Export Template
    • Formula Functions
      • Logical Functions
        • IF
        • SWITCH
        • AND
        • OR
        • NOT
        • XOR
        • IFNAN
      • Math Functions
        • SUM
        • SUBTRACT
        • PRODUCT
        • DIVISION
        • AVERAGE
        • AVERAGEEXZERO
        • AVERAGEEXNEG
        • AVERAGEEXZERONEG
        • COUNT
        • ABS
        • MIN
        • MAX
        • POWER
        • SQRT
        • EXP
        • LOG
        • ROUND
        • FLOOR
        • CEILING
      • Finance Functions
        • IRR
        • NPV
        • PMT
        • IPMT
        • FV
        • PV
        • CUMIPMT
        • CUMPRINC
        • RATE
      • Range Functions
        • RANGE
        • LastNPeriods
        • Get
        • ForEach
        • findByTitle
        • GETCURRENTRANGE
        • GETROWVALUE
        • THIS_SOURCE_KEY
        • PERIOD_LOOKUP
        • PRIOR_SERIES_PERIOD_LOOKUP
      • Static Identifiers
        • THIS/ME
        • CURRENT_SERIES*
        • CURRENT_SERIES_ID*
        • CURRENT_PERIOD_INDEX
        • CURRENT_NODE_VALUES
        • DS.SERIES
      • Node Properties
        • Node Properties Explanation
    • Global Settings
  • Plan
    • Create New Plan
    • Time Series Forecasting
    • Allocation Features
      • Goal Seek
      • Distribute
      • Copy to Periods
    • Driver Based Planning
      • Enabling Driver Based Plan
      • Configuring Driver Inputs
      • Bulk Configuration of Drivers
    • Plan Interface
  • Simulate
    • Create a Scenario
    • Perform Simulations
    • Manage Scenarios
    • Simulation Interface
    • Add Notes
    • Compare Scenarios
    • Scenario Analysis by Node
    • Create Initiatives in a Scenario
      • Steps to create initiatives
    • Create your Presentation
    • Understanding the Node Components
  • Report
    • Variance Analysis Report
  • ValQ Premium FAQs
  • Glossary
  • Resources
  • Release Notes
Powered by GitBook
On this page
  • Syntax
  • Arguments
  • Return Value
  • Remarks
  • Example
  • Result
  1. Model
  2. Formula Functions
  3. Logical Functions

XOR

A XOR statement returns a logical 'Exclusive Or' of all arguments. XOR gives TRUE only when the conditions return different truth values.

Arguments
Result

1 or more test conditions return different results (TRUE and FALSE)

TRUE

All the conditions are TRUE

FALSE

All the conditions are FALSE

FALSE

Syntax

XOR(logical_test1, ...logical_test2?)

Arguments

Arguments
Data type
Description

logical_test1

Node reference,number

The first condition to be evaluated. This is a required argument.

logical_test2?

Node reference,number

The additional conditions to be evaluated. These are optional arguments.

Return Value

Either True or False.

Remarks

OR : If at least 1 of the conditions is TRUE, the result is TRUE.

XOR : If only 1 of the conditions is TRUE, the result is TRUE but if both the conditions are TRUE the result is FALSE. XOR returns TRUE only if the conditions give different results, if both give the same results, XOR returns a FALSE.

Example

Consider the below scenario, where the price should be 20, if either Sales Quantity is greater than 50 or Customer Ranking = 1, but not both. It should be 25 otherwise.

To achieve this, the following formula should be written on the [Price] node:

IF(XOR([Sales Quantity]>50,[Customer Ranking]==1),20,25)

Result

As you can see from the above table, the result will be 20 when either of the conditions is true and it will be 25 when both the conditions are true/false. In Feb, both the conditions are TRUE so the result is False and the corresponding value for FALSE is returned which is 25. In Mar, both the conditions are FALSE so again the result in 25. Whereas in Jan, only 1 of the arguments is TRUE so the value will be 20.

PreviousNOTNextIFNAN

Last updated 1 year ago