Skip to main content
Skip table of contents

Using Calculations

Overview

Analytics allows you to run custom calculations and formatting against particular fields. This has many uses, but can be particularly useful in presenting raw data in a human-readable format.

Example

Using the Daily Usage Summaries Explore, create a simple report to show the Total Metered Run Time for each application (App/Desktop Name)

Hit Run and view the Visualization as a Table

This displays the list of applications and the total run time for each one, expressed as seconds.

As the example above shows, the top application by usage is Cam Studio (Parallels) with is showing as having run for 1,148,667 seconds.

Whilst this is correct and accurate, most people don’t read time in seconds, so it would be useful to be able to format or calculate a more ‘human readable' value to display.

Creating a calculation

  1. From the Data, tab choose the Calculations button


  2. In the Edit Table Calculation dialogue, reformat the time value and give the calculation a meaningful name.

  3. Then select the field you wish to calculate on. This query window is autocompleted, so as you start to type it will filter the results. Below we want to select the Total Metered Run Time value

  4. Once selected it will populate the query window and you can add other values manually if required.

    Because the recorded data displaying the total run time is recorded in seconds, we pull that value and then divide by 86400 (the number of seconds in a day)

    ${aa_daily_app_metered_usage_aggregates.total_run_time}/86400

  5. If this calculation is left as is with the default formatting, then this particular calculation will reformat the value to display as days, rounding up or down to the nearest day.

    However, custom formatting can be applied to make a more standard display of time spent.


  6. In the Custom… field we can enter standard date notation to change the display a more readable d HH:MM:SS using the following syntax

    d" days, "hh" hours, "mm" mins, "ss" secs."

  7. At this point, you can add a second calculation if needed, or press the Save Table Calculations button.

  8. The new formatted value is now displayed in the Data and Visualization table of your report.

  9. To stop the original value (seconds) from being displayed in your visualization, it can be hidden via the Data tab

  10. Your report now shows the correct formatted Total Run Time and can now be saved/added to your Dashboards as required.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.