5. Intro to Application Building in Workshop24. Formatting A Metric
Feedback

24 - Formatting a metric

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

📖 Task Introduction

Your metric card value shows a value with too many significant digits. Let’s implement some rounding and conditional coloring based on the value.

🔨 Task Instructions

  1. In your metric card configuration panel, move the Numeric Formatting toggle to the “On” position.

    • This should automatically reduce the number of fraction digits, but let’s give it some additional specificity.
  2. Click into the ➕ Maximum fraction digits field and set the value to 2.

  3. Just underneath the numeric formatting settings, set the Background Color value to Dynamic.

  4. Click ➕ Add rule.

  5. In the conditional formatting rule pop-up window, change the Exact numeric match value to Numeric range between 15 and 100.

  6. Change the formatting on the right side of the window from Success to Warning.

  7. Click the blue Update rule button in the bottom right of the window.

  8. Click back into your main module and in the filter list, tick the priority = medium box and note the conditional formatting changes with the selection.

  9. Save and publish your module.

The metric card widget provides a wide array of options, and we suggest you take a few moments to review them in the product documentation.