Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Better documentation for calculated fields?

Answered
Dan Naselius asked on May 9, 2020

We are trying to leverage the calculated fields through the user interface and would like to get a list of formats, optional calculations, formula’s etc.  While simple calculated fields are pretty easy, the next tier of complexity requires a much better understanding of what is possible. 
 
For instance if I were to track the daily COVID-19 data here https://covidtracking.com/api/v1/states/daily.json.  
How would I calculate the following:

  • a day over day growth of positive cases? 
  • Growth rate over the last 3 days or 7 days shown each day?
  • The number of days it takes to double the positive cases shown each day so you could see a trend over time?

I’m hoping there is a document that lays out all of the options and how to use them?

3 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 12, 2020

Hi Dan,
 
Thank you for posting your question.
 
To start with, please see the following documentation page for a detailed overview of all the features available under calculated values: https://www.flexmonster.com/doc/calculated-values 
We also think it might be helpful to check out the full list of supported aggregation functions in our technical specifications: https://www.flexmonster.com/technical-specifications/ 
 
Answering your questions:

  1. The day to day growth can be visualized using the built-in difference aggregation. We’ve built a quick sample to illustrate this function in action: https://jsfiddle.net/flexmonster/kuosLyzf/
  2. The growth rate can similarly be calculated with the % difference aggregation provided by Flexmonster. It is important to understand that the difference and % difference aggregations are calculated based on neighboring hierarchy members. Therefore, to calculate the growth rate over a specific period of time, you need to filter the date field in a way that the start and end dates of the period are displayed. Please see the following sample illustrating this approach: https://jsfiddle.net/flexmonster/49gk8m7t/
  3. Speaking of your 3rd question, the right formula for this use case (doubling time = ln(2) / ln(1 + growth rate)) requires using the logarithm function, which is currently not supported in Flexmonster calculated values. Could you please specify how critical this is for you so that we can understand the whole situation better?

    Alternatively, you can create your own aggregation functions when building a custom data source API implementation, although this option also requires some work on your side.

 
We hope we’ve managed to help you with your questions. Feel free to reach out if you have any further questions we can help you with.
 
Best regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 18, 2020

Hi Dan,
 
Hope you’re doing well!
 
We are just checking in to make sure you’ve received our response to this question. Do you think you could give us an estimate of how important it is for you to have the ability to use logarithms in formulas?
 
Thank you in advance and looking forward to hearing from you.
 
Regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 25, 2020

Hi Dan,
 
How are you?
 
We were wondering if you’ve received our last reply. Could you please give us any insights on our previous inquiry?
 
Thank you!
 
Regards,
Mykhailo

Please login or Register to Submit Answer