Platform

Platform

A place for Apptio product users to learn, connect, share and grow together.

 View Only
Expand all | Collapse all

Using Icons or colors in tables?

  • 1.  Using Icons or colors in tables?

    Posted Mon May 09, 2022 01:01 PM
    I am trying to change the color of the text in a column on the report based on the value in the column.   The column has values of Red, Yellow Green, or blank.  Is there a way to do this?  I can not seem to find a way to do the conditional color formating.  I have also tried to use the icon formula in a column but I was not able to get it to work since there are 4 possible values.  Thanks!​
    #TBMStudio


  • 2.  RE: Using Icons or colors in tables?

    Posted Mon May 09, 2022 02:16 PM
    Try this post?


  • 3.  RE: Using Icons or colors in tables?

    Posted Mon May 09, 2022 03:02 PM
    Thanks.  I was able to get the icon working.  However, I am not sure how to use the formatting for this since the values are text and not numeric.


  • 4.  RE: Using Icons or colors in tables?

    Posted Mon May 09, 2022 03:39 PM
    Edited by System Admin Tue November 05, 2024 06:04 PM
    You might try using Chris' solution in that post, but instead, point to the column name and reference the specific text...

    =If(Column="A", "green", If(Column= "B", "yellow", "red"))

    Forgot to mention earlier, too, if you don't want the circle icons and prefer arrows, you can do that, too, by switching out '3colorcircles' for '3arrows'...




  • 5.  RE: Using Icons or colors in tables?

    Posted Mon May 09, 2022 08:18 PM
    The highlighting works for the entire column but I was looking for just highlighting the text and I can not seem to 4 values.  IE the 3 colors (R Y G) and Blank for ones that don't have a value.  Thanks! @Jenny Franklin​


  • 6.  RE: Using Icons or colors in tables?

    Posted Tue May 10, 2022 03:43 PM
    Edited by System Admin Tue November 05, 2024 05:53 PM
    Hey ​ @James Funk!  Would you happen to know how to highlight text with colors?  👆 

    I swear I've seen something on that, but may be a minute today before I can scour the Community and my notes. 

    Figured you might have some HTML up your sleeve 🙃​ that would work that Michael could use? 

    Thank you!! 🙌




  • 7.  RE: Using Icons or colors in tables?

    Posted Wed May 11, 2022 10:00 AM
    Edited by James Funk Tue November 05, 2024 05:57 PM
    I don't think there's a way to change the color of a field that is brought in directly from the backing dataset, but you should be able to do this with by inserting a new field that references the field from the backing dataset.

    You'll need to create a new column in the report using the Insert option in the Ribbon.


    From there, you'll want to define the field format as Advanced and then just define the format as follows:


    This example will change the color of the text to blur if the criteria is met, otherwise it will leave it as black.  You can nest Ifs here to define a number of different colors if needed.  And you can also reference other fields for your criteria... for example, =if({Backing Dataset.Criteria Field}="Your Criteria","<span style='color:blue'>"&{$_}&"</span>",{$_}).  If you do need to reference another field, you'll just need to make sure that other field is dropped into the Ad Hoc Query window so it's available to the report (and you can hide it if you don't want to show it on the report).

    Edit: Sorry, my screenshot for the Advanced formula makes it look like there is a pipe on the end of the formula.  There should not be a pipe... that's just my cursor! :D




  • 8.  RE: Using Icons or colors in tables?

    Posted Wed May 11, 2022 11:14 AM
    Thank you @James Funk and @Ben Foster!  🙌😎​​


  • 9.  RE: Using Icons or colors in tables?

    Posted Wed May 11, 2022 10:25 AM
    Im not sure which solution you were looking for, but here are 2 ways to highlight based on conditions (both text and cell)

    Option 1 - Highlight Cell w/ Text:


    Option 2 - Highlight text:


    CSS Portion of formula: <span style='color:green; font-size:small'>"&Cost Source Master Data.Cost Pool&"</span>"

    Full formula:  =IF(Cost Pool="Telecom","<span style='color:green; font-size:small'>"&Cost Source Master Data.Cost Pool&"</span>",IF(Cost Pool="Other","<span style='color:red; font-size:small'>"&Cost Source Master Data.Cost Pool&"</span>",IF(Cost Pool="","<span style='color:white; font-size:small'>"&Cost Source Master Data.Cost Pool&"</span>","<span style='color:blue; font-size:small'>"&Cost Source Master Data.Cost Pool&"</span>")))


  • 10.  RE: Using Icons or colors in tables?

    Posted Thu May 12, 2022 04:54 AM
    Thanks, @Ben Foster.
    I have reproduced what you call Option 1 (by entering a similar formula in the Highlight dialog).
    (Later) After some more tinkering, I got to work the second one too.
    Many thanks!!!
    ​​

    ------------------------------
    Regards, Guillermo
    ------------------------------



  • 11.  RE: Using Icons or colors in tables?

    Posted Fri May 13, 2022 12:46 AM
    @Guillermo CuadradoThanks. Can you post how you did the second one.  I was working on it but could never get it work.  Just need to understand where to put the full formula.  ​


  • 12.  RE: Using Icons or colors in tables?

    Posted Fri May 13, 2022 03:31 AM

    Sure, @Michael Enslein. In a report, I created a formula column ("Replica", in the picture​ with the formula provided by @Ben Foster above:


    And these are the results. The first 2 columns represent Option 1, and "Replica",  Option 2:

    I hope this helps.

    ​​​

    ------------------------------
    Regards, Guillermo
    ------------------------------