5. Intro to Application Building in Workshop25. Adding A Secondary Metric To Your Metric Card

25 - Adding a secondary metric to your metric card

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

📖 Task Introduction

You now have the Average Risk Score for your filtered alerts displayed at the top of the inbox. Metric cards allow you to display unique object properties or aggregated Object set properties. Sometimes, a standalone metric isn’t sufficient to understand it: how does the Average Risk score of your filtered alerts compare to the Average Risk Score of all alerts?

To give further information to the end user, you’ll now learn how to display a secondary metric, serving as a benchmark or comparison to the first.

🔨 Task Instructions

  1. Scroll down the panel of your Avg Risk Score to toggle Show secondary metric? to YES.
  2. Change the Secondary Metric field to Total Avg: {{value}}.
  3. Set the secondary metric value type to Number. Then populate the value with a ➕ New numeric variable that is an Object set aggregation.
  4. Name it [m] Total Avg Risk Score.
  5. Set the starting object set to [o] All Flight Alerts, the aggregation method to Average, and the object property to Risk Score.
  6. In the metric card configuration panel, toggle the numeric formatting switch to the “On” position. Set Maximum fraction digits to 2.