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
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
Store the calculated value in a variable (the difference between yesterday’s and day before’s values)
Create 2 metric cards and put them both in individual sections.
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.
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.
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.