Platform

Platform

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

 View Only
  • 1.  HTML - Display only when a condition is true

    Posted Tue March 24, 2020 09:59 PM

    I have a pie chart that shows costs by 4 different metrics. However, data for 1 of these metrics is only available on a quarter to quarter basis. So for the in-between months, the pie chart has only 3 slices. This may confuse the report viewers who's be expecting to see 4 slices.

     

    Hence, I'd like to add a conditional HTML object, which should display only when that metric has 0 value (i.e. data unavailable). However, when that metric is available, I'd the HTML to be hidden and not display anything at all.

     

    How can I do this in Apptio?



    #TBMStudio


  • 2.  Re: HTML - Display only when a condition is true

    Posted Sun March 29, 2020 06:23 PM

    @Jenny Goodwin, @Cliff Bird, @Debbie Hagen ... another HTML query. Please help me with this. Thanks in advance.


    #TBMStudio


  • 3.  Re: HTML - Display only when a condition is true

    Posted Mon March 30, 2020 05:41 PM

    @Chris Davidson do you have someone on your team that can assist JJ with his2  HTML questions?  (or do you have the time to write it b/c I'm sure you know the answer ;-} )


    #TBMStudio


  • 4.  Re: HTML - Display only when a condition is true

    Posted Tue March 31, 2020 01:31 PM

    Can you repeat the quarterly data in your source data.  Just copy the source data and filter the quarterly data and append it to the source data.  Then you could a filter to remove duplicates.


    #TBMStudio


  • 5.  Re: HTML - Display only when a condition is true

    Posted Tue March 31, 2020 06:15 PM

    @Michelle McGuire ... thanks. However, the problem I'm solving for is somewhat different. For the non-quarter ending months, I do not have the 4th category dataset at all. Hence, my pie chart will have only 3 slices and I want to include some text for the user to explain that. In the quarter ending months, all 4 categories are present, and so such text is redundant.

     

    Hence, I'd like the HTML tip to be visible only when that 4th category dataset does not have any rows.


    #TBMStudio


  • 6.  Re: HTML - Display only when a condition is true

    Posted Wed April 01, 2020 03:36 AM

    <%=If(Metric=0,"This is text to display.","")%>

     

    After swapping out the Metric and text string to display, enclose the code snippet within whatever <font>, <p>, <div>, etc tag and you should be golden. Don't forget to terminate your opening tag, too, something like this...

     

    <p><i><span style="font-size:13px;color:blue">
    <%=If(Metric=0,"This is text to display.","")%>
    </span></i></p>

     

     


    #TBMStudio


  • 7.  Re: HTML - Display only when a condition is true

    Posted Wed April 01, 2020 04:52 PM

    That should do the trick. If it doesn't, post back on how close you are to a solution for us to help close the gap.


    #TBMStudio