KPI Table

How do I create something like this in DOMO?

Each row has different conditional formatting rules.

Please help.

Best Answer

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🔴
    Accepted Answer

    If Target is a field in your dataset, then you actually don't even need to worry about which row it is. This beast mode will color it based on if the number per month is greater than or less than the target.

    CASE WHEN `numberPerMonth` < `target` THEN 
      	concat('<div style="background-color:red; color:white; margin:-20px; padding:20px">',SUM(`numberPerMonth`),'</div>')
      	concat('<div style="background-color:green; color:white; margin:-20px; padding:20px">',SUM(`numberPerMonth`),'</div>')

    You'll need to change the field names to match what the fields are called in your dataset, but this should do what you want.


  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🔴
    edited August 2021

    I would use the HTML table card so that you can construct beast modes that would color the cells based on your different formatting rules. Use the <div> tag to set colors.

    Here is an example syntax:

    WHEN SUM(`Sales Amount`) < 300000 THEN 
    concat('<div style="background-color:red; color:white; margin:-20px; padding:20px">',SUM(`Sales Amount`),'</div>')
    concat('<div style="background-color:green; color:white; margin:-20px; padding:20px">',SUM(`Sales Amount`),'</div>')

  • Can you help me with the construction of beast mode. My apologies, I am a new Domo user.

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🔴

    I edited my first comment to include a sample beast mode that would color the cells. If you provide some insight on your fields and rules, I can probably write one specific to your instance.

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🔴
  • For example, in my KPI, (first row) Volume, target is 1000, for January it is green, if the number per month is less than 1000, then it would be red...

    in the second row, if the safety numbers is zero, then green, if more than zero, then red.

    I want to understand how shall I apply your formula per row.

    My apologies :(

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🔴

    You would need to repeat this for each column, though. Label the Beast Mode January, February, etc. and use the appropriate fields in each beast mode.

  • it colors the whole column not just a particular cell. what I am trying to do it to color it based on the KPI column in which each row has different color rulings per month :(

  • My problem was solved already by adding some case to your formula. Another question, how can I put an individual drill path per cell?

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🔴

    Glad my formula worked for you. You can only drill to one card. You can't drill to different card types based on what you click on if that is what you are trying to do. The field you click on will be part of your filter criteria.

  • @MarkSnodgrass , another concern, can I customize each row wherein, one row is in percentage format, currency and number?


    KPI Result

    Compliance 100%

    Savings $100

    Errors 4.5

  • Ritwik
    Ritwik Atlanta 🟡

    @mhperez You can add that needed formatting within the beast mode. Domo itself will read the column (and its values) as text.

    You can use the CONCAT() functionality to add in a '%' at the end of each Compliance value, a '$' in front of each Savings value, etc.

  • How can I update the card, same time I update and saved the excel file?

    i already tried updating the data at the bottom of the card but it's not updating :(