The Flip Sign transformation in Nexadata Pipelines allows you to automatically change the sign (positive to negative or vice versa) of numerical values in selected columns based on specific conditions. This transformation is ideal when you need to adjust values dynamically, especially in financial automation scenarios like automating journal entries or adjusting expenses and revenues. You can configure the transformation using either Natural Language Mode or Advanced Mode, depending on the level of control required.
Inputs for the Flip Sign Transformation
Name of the Transformation: In Natural Language Mode, the transformation name is automatically generated, but it can be updated later using Advanced Mode. For instance, if you're automating journal entries, you might rename it to "Debit/Credit Sign Adjuster".
Columns to Flip: Select one or more columns where you want the numerical values’ signs to be flipped. For example, you might flip the "Transaction Amount" or "Expenses" column.
Conditions: Define the conditions under which the sign should be flipped. These conditions, similar to those in the Filter transformation, determine when the sign will be reversed based on other column values.
Using Natural Language Mode
In Natural Language Mode, you can provide a simple instruction to configure the Flip Sign transformation, and Nexadata will automatically set up the transformation for you. The transformation name will also be automatically generated, but you can modify it later in Advanced Mode.
Example Instructions in Natural Language Mode
Reverse the sign of every value in the Expenses column.
Convert the values in the Expenses column from positive to negative, and vice versa.
Change the sign of all values in the Revenue column to reflect refunds and returns accurately.
Reverse the sign of all figures in the Expense column.
Invert the sign of all entries under the Discount Amount field.
Note: If Natural Language Mode doesn’t fully capture your needs, you can switch to Advanced Mode to refine the transformation.
Using Advanced Mode
In Advanced Mode, you have full control over how the Flip Sign transformation is set up. This mode allows you to define multiple conditions, combine them with AND/OR logic, and specify how and when the sign flip occurs.
Steps in Advanced Mode
Name of the Transformation: Enter a custom name, such as "Expense Sign Adjuster".
Columns to Flip: Choose one or more columns where you want the numerical values to be flipped (e.g., "Expenses", "Transaction Amount").
Set Conditions: Define the conditions under which the sign flip should occur. You can combine conditions with AND/OR logic and group them for more complex scenarios. Each condition includes:
Column to Apply the Condition: Select the column that will be checked to decide whether to flip the sign.
Comparison Operator: Choose how the value will be compared (e.g., Equal, Not Equal, Starts With).
Comparison Support: Choose whether to compare against a Value, Column, or Percentage.
Comparison Value: Input the value, column, or percentage to determine when the sign should flip.
Example in Advanced Mode
Name of the Transformation: Debit/Credit Sign Adjuster
Columns to Flip: Transaction Amount
Condition: Flip the sign if Transaction Type equals "Credit"
Advanced Mode gives you the flexibility to build more complex conditions, ensuring the sign flip occurs under precise criteria.
Managing Multiple Conditions
You can add multiple conditions to refine when the sign flip occurs. Conditions can be connected using AND or OR logic:
AND: All conditions must be true for the sign flip to occur.
OR: If any condition is true, the sign flip will occur.
Grouping Conditions
Conditions can also be grouped to create more complex logic, allowing for highly customized workflows. For example, you may want to flip the sign when "Transaction Type" = "Credit" AND "Category" = "Revenue".
Example Use Case: Automating Journal Entries
The Flip Sign transformation is often used to automate accounting tasks, such as dynamically adjusting the sign of transaction values for journal entries. For example:
Name of the Transformation: Debit/Credit Sign Adjuster
Columns to Flip: Transaction Amount
Condition: Flip the sign if Transaction Type equals "Credit"
In this case, the transformation will automatically adjust the sign of transactions, flipping the value to negative for credits and keeping it positive for debits. This streamlines financial reporting and removes the need for manual adjustments.
Additional Use Cases:
Revenue and Expense Reporting: Flip the sign of values in the "Amount" column based on whether the "Category" is "Revenue" or "Expense".
Stock Trading: Flip the sign of stock quantities depending on whether the "Action" column indicates a "Buy" or "Sell".
Discount Application: Automatically invert the values in the "Discount" column when discounts are applied.
Summary
The Flip Sign transformation in Nexadata Pipelines is a powerful tool for automating workflows where the sign of numerical values needs to be dynamically adjusted based on conditional logic. Whether you use Natural Language Mode for quick setup or Advanced Mode for more control, the transformation helps automate tasks such as journal entries and expense adjustments with ease.