Can we round the values to 1 decimal point for formula calculations?
Hi Saransh C., 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
Yes, you can round the values to 1 decimal point for formula calculations in Mixpanel. This can be achieved using the round()
function within a formula.According to the Mixpanel documentation on Custom Properties, the round()
function is available for use in formulas. The round()
function "Returns the nearest integer value of the input value."To round to 1 decimal point, you can use a combination of multiplication, the round()
function, and division. Here's how you can do it: 1. Multiply your value by 10
2. Use the round()
function
3. Divide the result by 10For example, if you have a formula A / B
and you want to round it to 1 decimal place, you could modify it like this: LBKSround((A / B) ** 10) / 10LBKS
This will effectively round the result of A / B
to 1 decimal place.Remember that formulas in Mixpanel support basic arithmetic operators (+, -, **, /) and parentheses for order of operations, so you can construct more complex formulas as needed Insights: Visualize trends and compositions within your data.It's worth noting that while this method works, Mixpanel doesn't have a built-in function specifically for rounding to a certain number of decimal places. The approach described above is a workaround using the available functions and operators.
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.