BIP Conditional Data Formats — Oracle Analytics

Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

BIP Conditional Data Formats

Received Response
133
Views
5
Comments

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!

Answers

  • Sketz
    Sketz Rank 4 - Community Specialist

    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).

  • 2771861
    2771861 Rank 4 - Community Specialist

    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!

  • Dir_Pal
    Dir_Pal Rank 6 - Analytics Lead

    <?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.

  • Sketz
    Sketz Rank 4 - Community Specialist

    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?>

  • 2771861
    2771861 Rank 4 - Community Specialist

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