Metric Math: Calculations between two data streams

The ability to monitor KPIs for individual teams or projects is one of the major benefits of the AppInsights platform.  But what about investigating the correlation between two separate data streams?  It’s easy enough to drag and drop your widgets to visually compare one data-set to another, but let’s take it one step further…

Our Metric Math widget allows users to run basic calculations -- addition, subtraction, multiplication, division -- between two data streams.  Alternatively, you can compare the value of a single data stream to a constant value that you specify (to calculate your trajectory towards a pre-defined goal, for example).

To get started, you’ll need to identify the two data streams you’d like to use for your calculation.  These data stream identifiers can be found in the “Edit Widget Settings” menu of any widget on your dashboard.  Just hover over the populated widget and a gear icon will appear at top right of the widget; click the icon and select “Edit Widget Settings”.  From the “Data Settings” tab, scroll down and click the “API Access” drop-down to reveal the unique data stream identifier for your widget.

Metric Guide Metric Math 1

Metric Guide Metric Math 2

Once you’ve identified and made note of your data stream identifiers, navigate to the Services panel by clicking the blue “+” button on the left side of the app.  Select the Metric Math tile (top right) and then choose the visualization you would like to use to represent the custom data point you’re going to create.

Metric Guide Metric Math 3

Once you've selected the visualization you'd like to use, hit the blue gear icon for your new widget and enter the “Edit Widget Settings” menu.

Metric Guide Metric Math 4

Use the two “Data Source” drop-down menus to find and select the two data streams you'd like to use in the calculation, and then choose the function you'd like to run.  (If you’re interested in running a calculation between a single data stream and a “Constant Value”, you can select this option and specify your value under Data Source 2.)

Metric Guide Metric Math 5

Once you’ve selected your streams and the corresponding math function, hit the blue save button and your new widget will automatically populate.  As the values of your selected data streams update, the function will re-calculate to reflect a new, accurate value.

Was this tutorial helpful?  Please take a moment to submit your “Yes” or “No” answer below!  You can also contact us or post a public question for further instruction.



Did you find this article helpful?