Skip to main content
MaLana Martinez a posé une question dans #Datorama

I know there is a LEFT and a RIGHT formula in the custom measures in dimensions, but I don't see a MID? I've seen extract, but I can't get it to perform the way I need it to. Is anyone familiar with a substitute for the MID function in Datorama

2 réponses
  1. 25 avr. 2023, 17:09

    Hi @MaLana Martinez,

     

    Datorama does not have a MID function in its formula editor. 

    However, you can use the Extract function to achieve the same result. The syntax for the Extract function is:

    Extract(<input string>, <start position>, <end position>)

    For example, if you want to extract the middle three characters of a string, you can use the following formula:

    Extract(<input string>, Round((Length(<input string>) - 2) / 2), Round((Length(<input string>) + 1) / 2))

    This formula calculates the start and end positions based on the length of the input string, so it will always extract the middle three characters, regardless of the length of the input string.

    You can replace <input string> with the field or expression that you want to extract the middle characters from.

     

    I hope this helps!

0/9000