LeftTrim and RightTrim Text Functions
LeftTrim and RightTrim are delimiter-based text functions introduced to return the source text value to the left or right of a specified delimiter. These text functions are useful for extracting or trimming variable-length prefixes/suffixes in strings returned by other text functions (for example, MemberAlias or MemberName) when a delimiter (such as “-”) is present. You can use these functions instead of Left, Right, or Mid when the number of characters to remove varies and the delimiter reliably indicates the split point.
Example:
For a segment with Accounts where MemberAlias("Accounts") = "10000 - Net Income":
LeftTrim(MemberAlias("Accounts"), "-", 1) yields "10000"
RightTrim(MemberAlias("Accounts"), "-", 1) yields "Net Income"
Applies to: Enterprise Profitability and Cost Management, Financial Consolidation and Close, FreeForm, Narrative Reporting, Planning, Tax Reporting
Business Benefit: This feature enables better reporting and analytics and lowers reporting discrepancies caused by manual string logic.
Key resources
- LeftTrim/RightTrim in Designing with Reports