Oracle Analytics

Get Involved. Join the Conversation.

Topic

    Carley Howell
    BIP Conditional Data Formats
    Topic posted May 2, 2018 by Carley HowellRed Ribbon: 250+ Points, last edited September 11, 2019 by Arijit ChakrabortyBronze Trophy: 5,000+ Points 
    33 Views, 5 Comments
    Title:
    BIP Conditional Data Formats
    Summary:
    BIP Conditional Data Formats
    Content:

    Hi all,

     

    Can we apply conditional data formats to BIP reports like we can do in Answers? I am using the RTF template builder. I have a parameter named p_scaling, values are a fixed list and are as follows:

     

    m.0 (the measure should be divided by 1000000 and should have 1 decimal place)

    bn.0 (the measure should be divided by 1000000000 and should have 1 decimal place)

    m (the measure should be divided by 1000000)

    units (just show the measure)

     

    The division is going to be done in the data set using a case statement based on the parameter selection. But I'm not sure if the conditional decimals can be done in the data set too, since we need to set an overall formatting mask for the measure within the RTF template. Is there a way to add conditional data formats within the RTF template?

     

    Can anyone advise on the best way to do this?

     

    Thanks a lot!

    Comment

     

    • Sketz

      The standard way I use to format numbers is the following:

      Declare the format

      <xsl:decimal-format xdofo:ctx="begin" name="GER" decimal-separator="," grouping-separator="."/>

      Show the formatted number

      <?format-number(NUM_COLUMN,'#.###.###.##0,00','GER')?>

      I don't think that you can design the format itself conditional but you can easily call one out of two different formats (One with the decimal place and one without it).

    • Rithwik

      <?xdofx:if p_scaling = m.0 then XXXX

      else

      if p_scaling = bn.0 then XXXX

      else

      XXXX

      end if?>

      try using this which might be helpful if u can do it in case.

    • Carley Howell

      Hi Sven,

      Thanks for the reply. Do you know how the process you've suggested would work with the parameter I mentioned? Is it possible to base the formatting on the value of the parameter?

      Thanks!

    • Sketz

      It's nice to see that there are different approaches out there...

      I regulary use Choose or the "plain" BI-If

      Choose-Statement would be something like this:

      <xsl:decimal-format xdofo:ctx="begin" name="GER" decimal-separator="," grouping-separator="."/>

      <?choose:?>

      <?when: p_scaling = "m.0" or p_scaling = "bn.0" ?>

      <?format-number(NUM_COLUMN,'#.###.###.##0,0','GER')?>

      <?end when?>

      <?when: p_scaling = "m" or o_scaling = "units" ?>

      <?format-number(NUM_COLUMN,'#.###.###.##0','GER')?>

      <?end when?>

      <?end choose?>

    • Carley Howell

      Thanks for the help everyone, we're trying these options out now