I need documentation on using formulas in Mixpanel
Hi Bradley 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
Certainly! In Mixpanel, formulas allow you to perform calculations using simple arithmetic operators on your metrics within reports, especially in the Insights report. Here’s how you can use formulas:
Supported Operators
Mixpanel supports the following operators in formulas: - +
: Add
- -
: Subtract
- *
: Multiply
- /
: Divide
- ()
: Parentheses to influence the order of operationsYou can also use numbers as constants. For example, multiply a ratio by 100 to display it as a percentage, or divide a property value tracked in seconds by 3,600 to convert it to hours.
Creating a Formula
1. Click the Metrics button, then select Formula. 2. Each event in your query is assigned a letter (A, B, C, etc.). Use these letters in your formula. 3. Enter your formula using the supported operators.Example: To calculate product stickiness, you might use DAU, WAU, and MAU functions in a formula.
Saving and Reusing Formulas
- Enterprise and Growth plan users can save formulas for reuse across reports. Free users can create formulas locally within a report but cannot save them. - Saved formulas are accessible via the “+Formula” button and are also documented in the Lexicon tab under “Formulas.” - When a saved metric is updated, it will update across all reports where it’s used. - Note: You cannot nest a formula metric within another formula, and a saved formula cannot reference another formula.
Additional Notes
- All roles can create a saved formula, but only some can share them project-wide. - You can only view saved formulas created by you or shared with you.For more details, see the official documentation: Formulas in Insights and Lexicon: Formulas and Behaviors.
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.