I want to show performance of some computations inside my app. Duration of the computations depends on input size, so I want to compute avg(COMPUTATION_DURATION / INPUT_SIZE), but both values are params of the same event.
Of course I could just send that information in the event, but I don’t want to increase event size to avoid unnecessary network usage + I want to compute that for legacy data also
Hey
I don’t think there is an easy/direct way of isolating individual property values and doing such arithmetic inside the custom formula view. However, it supports arithmetic on values returned on property aggregation eg. PROPSUM,etc. So something like SUM ( all COMPUTATION_DURATION values ) / SUM( all INPUT_SIZE values ) recorded in a day/week/month is possible
I believe you want to calculate this ratio for every event and then average it over the time interval ? If yes, then the derived properties feature could help you do this i.e. create a new property on the relevant event which calculates this COMPUTATION_DURATION / INPUT_SIZE ratio. And then use the measured as Average of Property Value metric in the event seg chart or even the PROPAVG(A) custom formula.
Note that Derived properties is only available to enterprise customers and customers who have purchased the Govern add-on.
Hi
Besides Saish’s amazing suggestions, if your intention is indeed to make calculation of the properties that belong to one event and make it a new property, our Computations feature is perfect for it. Please note that this feature is only included in our Recommend Package.
In case you just want to see one average value during each day/week/month interval, instead of getting the ratio for each event, you could use a custom formula like this: https://analytics.amplitude.com/demo/chart/new/7dpczn0.
Hope this helps!
Reply
Welcome to the Amplitude Community!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you're a current customer, select the domain you use to sign in with Amplitude.
analytics.amplitude.com analytics.eu.amplitude.comWelcome to the Amplitude Community!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
If you're a current customer, select the domain you use to sign in with Amplitude.
analytics.amplitude.com analytics.eu.amplitude.comEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.