Left (PQL)

Returns a result string containing a specified number of characters from the left side of a provided string. 

  • Returned Output: Text
  • Library: PQL \ Common \ String
  • Version: 2018.00.000
  • Compatibility:
    • Can be combined with and other PQL function throughout the application.
    • It CANNOT be used with MDX or VBA functions. But it can be used on MDX-based content in other parts of the application.

Syntax

Left( <Text> , <Integer> )

* Click on the function's arguments above for more details on the input values.

Comments
  • The input text string can be any alphanumeric set of characters.
  • The number of characters must be provided as an integer or a numeric expression.
Different Function types
  • This function is like the Excel left function.

Examples

This example returns "app" from the input string "apple" by taking the left 3 characters

Left("apple",3)

This example returns "2019" from the input string of the current date and time, which was formatted as "2019-04" - by taking the left 4 characters

Left(DateFormat(DateTime(),"yyyy-MM"),4)