Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 44 Oracle Analytics and AI Sharing Center
- 19 Oracle Analytics and AI Lounge
- 278 Oracle Analytics and AI News
- 56 Oracle Analytics and AI Videos
- 16.2K Oracle Analytics and AI Forums
- 6.4K Oracle Analytics and AI Labs
- Oracle Analytics and AI User Groups
- 103 Oracle Analytics and AI Trainings
- 20 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
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!
Answers
-
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).
0 -
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!
0 -
<?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.
0 -
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?>
0 -
Thanks for the help everyone, we're trying these options out now
0