We are now part of Eviden, discover more...
Blogs / SAP / SAP Analytics Cloud / Analytic Applications / SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions

SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions

Dec 11, 2018

SHARE

In the previous blog in this series, we looked at an overview of scripting. In this blog, we will explore various functions available as part of analytic applications.

* * *

String Functions

String functions can be used to manipulate a string or extract any information needed. Following are the string functions available in analytic applications.

SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions
SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions

Some of the commonly used string functions are:

  • includes() – determines whether one string may be found inside another string by returning true or false.
  • indexof() – returns the index of first occurrence of a specified string within another string.
  • length() – returns the number of characters in a string.
  • replace() – replaces the main string with some or all matches of a pattern specified.
  • split() – splits and returns an array of string based on the specified pattern.
  • substring() – returns a subset of the main string between one index and another.
  • toLowercase() & toUpperCase() – converts the string to lower case and upper case respectively.

Math Functions

We have a comprehensive list of Math functions in analytic applications.

SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions

Array Functions

Following are the array functions available in analytic applications.

SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions
SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions

Some of the commonly used array functions are:

  • fill() – fills all elements of an array with a specified value.
  • pop() – removes the last element from the array and then returns it.
  • push() – appends one element at the end of the array and returns the new length of the array.
  • shift() – removes the first element from the array and then returns it.
  • splice() – changes the content of an array, adding new elements while removing old elements.

Date Functions

There are three date functions – now, parse and UTC. All three functions return values in milliseconds.

SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions
  • now() – returns the number of milliseconds elapsed till current date since January 1, 1970, 00:00:00 UTC.
  • parse() – parses the specified string into date and then returns the number of milliseconds elapsed till that date since January 1, 1970, 00:00:00 UTC.
  • UTC() – returns the number of milliseconds elapsed till the specified date since January 1, 1970, 00:00:00 UTC.

Conversion Functions

There are four conversion functions available in analytic applications. They are used to convert an integer or a number to a string and vice versa.

SAP Analytics Cloud – Application Design Series: 6 – String, Math, Array, Date & Conversion Functions

* * *

In the subsequent blog, we will explore how to leverage Global Variables in analytic applications.

Reach out to us here today if you are interested to evaluate if SAP Analytics Cloud is right for you.


Corporate HQ:
5920 Windhaven Pkwy, Plano, TX 75093

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com


Copyright © Visual BI Solutions Inc.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This!

Share this with your friends and colleagues!