Mixpanel Community Icon

Syntax for Modulus Operation in Custom Properties

·
·

when creating a custom property, what is the syntax for a modulus operation?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Howard A., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹

    Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    To create a custom property in Mixpanel that uses a modulus operation, you can use the % operator in your formula. According to the Mixpanel documentation on numeric operators, the modulus operator is represented by %.The syntax for using the modulus operator in a custom property formula would be:LBKS<expression1> % <expression2> LBKSWhere <expression1> and <expression2> are the operands you want to perform the modulus operation on. The result will be the remainder after division of <expression1> by <expression2> .For example, if you wanted to create a custom property that calculates the remainder when dividing one property by another, you could use a formula like:LBKSproperties["PropertyA"] % properties["PropertyB"]LBKSRemember that when creating a custom property, you can access the formula bar by clicking into it, and you can use Ctrl + Space to see a list of available functions and their descriptions.

    kapa.ai is still learning and improving, please let me know how I did by reacting below.

    ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.