Forum Discussion

marissam's avatar
marissam
Active Member
4 months ago

Segment Filters "Custom Attribute is exactly 0"

We have several numerical attributes in our instance, which we apply to our Braze Segments. Recently, we noticed that when we add the filter "Custom Attribute is exactly 0," it also includes users who have a null value for that attribute, not just those with a value of 0.

Has anyone else experienced this and thought this was the intended behavior? To address this, we now have to add an additional filter, "Custom Attribute is not blank," which seems redundant.

  • Hey Marissa, that's a very interesting discovery… It might be worth submitting a ticket as it almost feels like a bug, but your workaround is a great solution for now. I guess it's a necessary solution if Braze recognizes null as the same thing as zero.

  • Hello marissam My assumption is that the datatype of this custom attribute is Integer (Number). 
    The default value of a Number data type is 0 and that is why they are showing up in Segment.

    If you are planning to create a custom attribute to use it as a flag then I would suggest using Boolean as a data type.

  • sudo04's avatar
    sudo04
    Active Member

    Hi Marissam,
    Could you kindly explain how you assign a value of 0 to your custom attribute? Additionally, I would appreciate it if you could let me know the default value of this custom attribute. This information will help me assist you better.