nth occurrence text function - finds nth time a character occurs in a string

I would like the ability to use a function that allows me to search for the nth time a character or string of characters occurs in a concatenated key.

Currently, we import text string keys from source systems and derive business information from these strings. For instance, we might have the transaction key Customer123_ProductQ_RegionSW_PeriodQ1 (123_Q_SW_Q1). However, the customers, products, regions, or periods might not have the same text length every time/different variables might have the same text (if Product is SW and Region is SW), which makes using a combination of RIGHT, LEFT, MID, FIND, etc embedded in each other complex/difficult to maintain in order to extract this information to columns. However, if I were able to have a function like NthOccurrence(Name(Item('TransactionKey')), "_", 2) to find the beginning position of Region, our formulas would be clearer/easier to maintain.

Community Manager
Status changed to: Needs Community Support
Occasional Contributor

Has anyone found a workaround for this issue?

Users Online
Currently online: 230 members 471 guests
Please welcome our newest community members: