Worldsoft Documentation Search

User Cross Tab Formula Samples

Formula Mode Types:

  • Data Source
    • Typically used in columns, data, and rows areas
    • formulas are applied against underlying data (detail rows before they are grouped)
    • Note: Typically the slowest type as the formulas need to be evaluated on every line item
  • Use Summary Values
    • Typically used in Columns and Rows areas
    • Formulas applied against grouped data (normally what you see on the Pivot Grid is already grouped)
    • Note: This is the most common type
  • Use Aggregate Functions
    • Typically used in Data Areas
    • Formulas can use aggregate functions (grouping yourself)
    • Examples of Aggregate Functions are: Avg, Count, Exists, Max, Min, Sum, Single
Task To Be Completed Output Data Type Formula Mode Formula To Be Entered
Display the GL Period as a Month (Text) String Use Summary Values
  • Iif(
  • [Period] = 1, ‘April’,
  • [Period] = 2, ‘May’,
  • [Period] = 3, ‘June’,
  • [Period] = 4, ‘July’,
  • [Period] = 5, ‘August’,
  • [Period] = 6, ‘September’,
  • [Period] = 7, ‘October’,
  • [Period] = 8, ‘November’,
  • [Period] = 9, ‘December’,
  • [Period] = 10, ‘January’,
  • [Period] = 11, ‘February’,
  • [Period] = 12, ‘March’,
  • ‘Unknown’)

 

Multiply a sum by a specific multiplier

 

Decimal Use Aggregate Functions
  • SUM([Field]) * 1.5

 

Create an Average Cost column

Note: Division occurs at summary level

Decimal Use Summary Values
  • Iif(IsNull([Hours], 0) = 0, 0, IsNull([Amount], 0) / [Hours])

 

Dedicate column to specific budget version (Budget version reference 19 is BUDGET 2017-2018 Version A for example)  Column is named such as Amount_PY to refer to it in another formula Decimal Data source
  • IIf([Budget Version (Lookup)] = 19, IsNull([Amount], 0), 0)

Means include only amounts that belong to this specific version.  Database select will include more than one version for example.  Data source used as need detailed information to determine its source

Create variance from two summary columns (The source columns must be defined first as per previous entry) Decimal Use Summary Values
  • IsNull([Amount_CY], 0) – IsNull([Amount_PY], 0)

 

Create specific column based on one or more criteria Decimal Data Source
  • Iif([Earning Benefit Type (Lookup)] = 10, IsNull([Amount], 0), 0)

If there are more than single items, consider creating dynamic groups first to keep management of the crosstab simple to edit.  Example would be several Earning Benefit types in a single group not otherwise defined.  Once the dynamic groups are defined, you can simply drag that dynamic group into the column or row dimension.  Column specific formula are normally used when you cannot create dynamic groups such as budget versions where the data would otherwise be mixed together.

Convert GL Period to Quarters

Option 1 – Fiscal Year

String Use Summary Values
  • ‘QTR ‘ + ToStr(ToInt(([Gl Period] – 1) / 3) + 1)

Note: If you right-click on a GL Period, you can select this pre-defined formula via: “Numeric Formulas” with the option Group By 3 (Quarters) As String.  This means group by three GL Periods by quarter.  This will respect the quarters by fiscal versus calendar year.

Convert GL Period Start Date to Quarters

Option 2 – Calendar Year

Date Group Interval N/A Not a formula.  Right click on a GL Period Start Date and select “Date/Time Group Interval” and select DateQuarterYear.