Skip to main content
Solved

Is there a way to filter properties by character length?

  • 2 July 2024
  • 1 reply
  • 116 views

I have an event that collects freeform string inputs from users. A lot of users will input really short responses (eg. less than 3 characters). I want to exclude all of those short length results in my group by analysis. Is there any way to to do this?

1 reply

Userlevel 2
Badge +5
Hi Oliver,

Thanks for writing to Amplitude Community, happy to help!

Currently, Amplitude does not support filtering properties by character length directly in the UI. However, there is a workaround you can consider. You can send an additional event property that counts the number of characters in the string input. This way, you can filter out the events with the property value (character count) less than a certain number.

For example, if you have an event `user_input` with a property `input_string`, you can add another property `input_length` that stores the character count of `input_string`. Then in your analysis, you can filter out `user_input` events where `input_length` is less than 3.

Please note that this solution requires changes in the way you send data to Amplitude and might not be applicable to historical data.

Otherwise, this would be a feature request. We'd like to encourage you to submit a feature request via the help button at the top right corner on the UI (question mark icon) > Contact Us > Select 'Feature Request' > Submit Feedback. This will send your feedback to the Product team directly!

Please share as much information as possible about your use case and how you visualize the feature. Links are more than welcome! A detailed description would help our Product team understand the importance of the request better.

Please do not hesitate to reach out if you have any other questions!

Best,
Yosimy


P.S. Checkout upcoming events and user meetups on our events page.

Reply