Multiple values in Single value card

Options

Hello,

I am using a Single Value visual on the dashboard. So basically I am displaying the current value on the card.

While I show that value, I am seeking to display its, Previous and Next values as well.

I am able to use the subtitle for one value. Besides, how can I display the other value?

Thanks in advance.

Best Answers

  • Sean_Tully
    Sean_Tully Contributor
    edited May 3 Answer ✓
    Options

    It depends on how your data is structured, but one solution might be to create a Beast Mode where you concatenate the three values together, such as:

    concat('Current - ', current_field, '
    Previous - ', previous_field, '
    Next - ', next_field)

  • david_cunningham
    Answer ✓
    Options

    @LearningNinja you could do something like this. Use the single value for the current value, and then a beast mode for the previous and next value.

    A few things to keep in mind.

    For summary numbers with CONCAT(), you can use a <br> tag to force a new line. See how in the example the previous value and the next value are on 2 separate lines.

    CONCAT() removes the formatting you're used to having access to, so if you have large values, or want commas, rounding, etc. You'll have to handle that all yourself in the beast mode.

    You'll have to either have the current/prev/next values flagged in the dataset to key off of, or you could make use of lag/lead functions to get the prev/next values as long as you know the current value. Let me know if you need any help with that.

    Here is a very oversimplified proof-of-concept

    CONCAT('Previous Value: ',AVG(case when order = -1 then Column end),'
    ',
    'Next Value: ', AVG(case when order = 1 then Column end))

    David Cunningham

    ** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
    ** Did this solve your problem? Accept it as a solution! ✔️**

Answers

  • Sean_Tully
    Sean_Tully Contributor
    edited May 3 Answer ✓
    Options

    It depends on how your data is structured, but one solution might be to create a Beast Mode where you concatenate the three values together, such as:

    concat('Current - ', current_field, '
    Previous - ', previous_field, '
    Next - ', next_field)

  • david_cunningham
    Answer ✓
    Options

    @LearningNinja you could do something like this. Use the single value for the current value, and then a beast mode for the previous and next value.

    A few things to keep in mind.

    For summary numbers with CONCAT(), you can use a <br> tag to force a new line. See how in the example the previous value and the next value are on 2 separate lines.

    CONCAT() removes the formatting you're used to having access to, so if you have large values, or want commas, rounding, etc. You'll have to handle that all yourself in the beast mode.

    You'll have to either have the current/prev/next values flagged in the dataset to key off of, or you could make use of lag/lead functions to get the prev/next values as long as you know the current value. Let me know if you need any help with that.

    Here is a very oversimplified proof-of-concept

    CONCAT('Previous Value: ',AVG(case when order = -1 then Column end),'
    ',
    'Next Value: ', AVG(case when order = 1 then Column end))

    David Cunningham

    ** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
    ** Did this solve your problem? Accept it as a solution! ✔️**