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

image-20250228-142414.png

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 Wireshark with is showing as having run for 7,791,256 seconds.

Whilst this is correct and accurate, this is is not the most understandable way to present this information, so it would be useful to be able to format or calculate a more ‘human readable' value to display.

Creating a calculation

Example: Metered application runtime in hours

In this example we will convert the total recorded run time for applications from seconds to hours.

  1. From the field selector find Custom Fields and select + Add

  2. From the dropdown menu, select Table Calculation

    image-20250228-142731.png

  3. The Create table calculation dialogue will be displayed

    image-20250228-143224.png

  4. From the Calculation dropdown, select Custom expression (this is the default)

  5. 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.

    image-20250228-143517.png

  6. 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 3600 (the number of seconds an hour)

    ${aa_daily_app_metered_usage_aggregates.total_run_time}/3600

  7. For Format, select Decimals and enter the required number of decimal places. In this example we will use 0 which will cause the values to be rounded up to the nearest whole number.

  8. Give the calculation a Name, which will appear in the data once the calculation is created. In this example we will use “Total Run Time (Hours)”.

    image-20250228-144210.png

  9. Press the Save button to create the new table calculation

  10. The new calculated value is now displayed in the Data and Visualization views of your report.

    image-20250228-144259.png

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

    image-20250228-144427.png

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

image-20250228-144538.png

JavaScript errors detected

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

If this problem persists, please contact our support.