• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Revelwood

Revelwood

  • Who We Are
    • About Us
      • Our Company
      • Our Team
      • Partners
    • Careers
      • Join Our Team
  • What We Do
    • SOLUTIONS
      • Workday Adaptive Planning
      • IBM Planning Analytics
      • BlackLine
    • SERVICES
      • Implementation Services
      • Advisory Services
      • Customer Care
        • Help Desk
        • System Admin
        • Performance Tune-Up
      • Training
        • Workday Adaptive Planning Training
        • IBM Planning Analytics / TM1 Training
    • PRODUCTS
      • DataMaestro
      • Lightspeed Planning & Reporting
      • IBM Planning Analytics Utilities
  • How We Help
    • Workday Adaptive Planning Use Cases
    • IBM Planning Analytics Use Cases
    • Client Success Stories
  • How We Think
    • Knowledge Center
    • Events
    • News
    • User Groups
  • Contact Us

IBM Planning Analytics Tips & Tricks: The SCAN Function

IBM Planning Analytics Tips & Tricks

IBM Planning Analytics Tips & Tricks: The SCAN Function

 

Tips & Tricks

January 25, 2022

By Lee Lazarow

Have you ever needed to parse data by looking for a specific character within your source records? Maybe you want to filter an employee’s last name from a “Lazarow, Lee” or maybe you want to define the year from “12/25/2021”.

All of this can be done with the SCAN function. The SCAN function is used to provide a number that defines the starting location of the first occurrence of a substring. If the substring does not occur in the given string, the function returns 0.

The syntax of the command is:

SCAN (substring, string)

For example:

SCAN (‘b’, ‘abcdef’) returns 2

The scan function can be used to find a specific character or to find a substring that consists of multiple characters.

SCAN (‘def’, ‘abcdef’) returns 4

This can be used in conjunction with the SUBST formula to filter text.

For example:

strTextValue = ‘Lazarow, Lee’;
numCommaLocation = SCAN(‘,’, strTextValue);
strLastName = SUBST (strTextValue, 1, numCommaLocation);

The above code would result in “Lazarow,” since the scan function gives the location of the comma. We can then remove the comma by subtracting 1 from the numCommaLocation value and the result would be “Lazarow”.

And what about a situation where you need to scan twice? Maybe you have a time stamp of “12/25/2021” and you want to pull out the year. We can do this by looking for the first slash, trimming the record, and then looking for the second slash within the remaining text.

strTextValue = ‘12/25/2021’;
numFirstSlashLocation = SCAN (‘/’, strTextValue);
strAfterFirstSlash = SUBST (strTextValue, numFirstSlashLocation + 1, 7);
numSecondSlashLocation = SCAN (‘/’, strAfterFirstSlash);
strAfterSecondSlash = SUBST (strAfterFirstSlash, numSecondSlashLocation + 1, 4);

Put this together and there is nothing you cannot parse!

IBM Planning Analytics, which TM1 is the engine for, is full of new features and functionality. Not sure where to start? Our team here at Revelwood can help. Contact us for more information at info@revelwood.com. And stay tuned for more Planning Analytics Tips & Tricks weekly in our Knowledge Center and in upcoming newsletters!

Read more IBM Planning Analytics Tips & Tricks:

IBM Planning Analytics Tips & Tricks: Fill Function

IBM Planning Analytics Tips & Tricks: The Aggregate Function

IBM Planning Analytics Tips & Tricks: TM1Ellist

    • Categories

      • Awards & Recognition
      • FP&A Done Right
      • IBM Planning Analytics Tips & Tricks
      • Modern Accounting
      • News & Events
      • Success Stories
      • Tech Bulletins
      • Workday Adaptive Planning Insights
      • Workday Adaptive Planning Tips & Tricks

    Popular Posts

    • Workday Adaptive Planning Tips & Tricks: The Formula Assistant – How To, Where & Why
    • Workday Adaptive Planning Tips & Tricks: Templates
    • IBM Planning Analytics Tips & Tricks: Troubleshooting Planning Analytics for Excel
    • Workday Adaptive Planning Named a Leader in Gartner Magic Quadrant for Cloud Financial Planning and Analysis Solutions 2020
    • Workday Adaptive Planning Tips & Tricks: Attributes, Accounts, Dimensions, Levels – What’s the Difference?

    Sign up for our newsletter

    Connect

    Authors

    • John Pra Sisto
    • Revelwood
    • Adam Riskin
    • Ailenette Cruz
    • Brian Combs
    • Dave Miersch
    • Dillon Rossman
    • Gary Leiffer
    • Ken Wolf
    • Koury Reid
    • Lee Lazarow
    • Lisa Minneci
    • Marc Assenza
    • Mary Luchs
    • Michelle Song
    • Nina Inverso
    • Summer Jeter
    • Tara Byrnes
    • Thanh Chau
    • Wesley DeMarco

Footer

Revelwood Overview

Revelwood helps finance organizations close, consolidate, plan, monitor and analyze business performance. As experts in solutions for the Office of Finance, we partner with best-in-breed software companies by applying best practices guidance and our pre-configured applications to help businesses achieve their full potential.

EXPERTISE

  • Workday Adaptive Planning
  • IBM Planning Analytics
  • BlackLine

ABOUT

  • Who We Are
  • What We Do
  • How We Help
  • How We Think
  • Privacy

CONNECT

Contact:
25B Vreeland Road, Suite 111
Florham Park, NJ 07932

201.984.3030
info@revelwood.com

© Revelwood Inc. All rights reserved. Revelwood® and the Revelwood logo are registered marks of Revelwood Inc. 

Managing your Month-End Checklist in BlackLine

Activity Analysis in BlackLine

Modern Accounting

Choosing the Right Accounting Software for your CFO Tech Stack

Modern Accounting: Choosing the Right Ac

Modern Accounting