In Wokshop - metric card: How to create a dynamic arrow and numeric/percentage value in comparison for two days?

I am trying to create metric card to display a dynamic numeric value as in the “Secondary Metric” in Workshop and need suggestions on how to achieve this.

Expected results as show below
image

Does Workshop has support to dynamically update both the arrow icon and the percentage/numeric values based on the comparison of yesterday’s data with the day before yesterday’s data?

If the icon is to complex or not supported yet, what would be the best method to at least update the numeric and percentage values.

What have I tried in Workshop
Create to metric card
First metric card has yesterday’s date and numeric value
Second card has day before yesterday’s and corresponding numeric value.
This solution is ok and understandable, but not so elegant.

Any suggestions on improving this would be greatly appreciated :slight_smile:

Hey @vip_001

I would recommend the following:

  1. Store the calculated value in a variable (the difference between yesterday’s and day before’s values)
  2. Create 2 metric cards and put them both in individual sections.
  3. Hardcode the Up Arrow in one metric card and the Down Arrow in the other. Fill in the secondary metric value in both the metric cards with the variable from step 1.
  4. Create a boolean variable that controls which section needs to be shown and use it to hide one metric card section and show the other.

Hope this helps!

Thank you @rishir. Did not totally understand your steps, but the step 4 helped me to understand how to hide/display sections

I’ve tried following:
create transform variable to get agg and then subtract.
Used the output to fill two metric cards in to two separate sections
Created boolean variable with greater true and added to each section with false or true to control which section can be displayed.

Will this approach work.

Yep! that should work