"Percent of" in OBIEE pivot-tables
I guess some of you might have used the neat function "Percent of" in the pivot-tables of OBIEE. Cool stuff ! And this easy to implement. Just click and say "Show Data as" "Percent of" and choose column, row, section, page, column parent, row parent or layer.
And you are done, that's it !
Comes along very useful !
Anyhow, just had a request from a customer wanting the percentage more accurate, with 2 decimals after the point. OK, I thought, should not be this difficult to find. But far out....
After a while I had checked all the formatting-options in Answers and Dashboards in depth, but still no clue where to in the end change that setting. Hence my last desperate consultant-try was to examine the pure XML-code for further hints. Et voila I got it.
If you want also 2 places after the decimal-separator go to the advanced tab of your OBIEE-frontend, copy the complete XML-request in a editor (wordpad or so, unfortunately you cannot search in the HTML-window in OBIEE directly), do a !!! BACKUP of the XML !!! first and then search for "saw:percent". Right after this there are two parameters for this type of display-schema <minDigits> and <maxDigits>.
<saw:dataFormat xsi:type="saw:percent" minDigits="1" maxDigits="1" scale="2"/></saw:displayFormat></saw:showAs>
Here the complete procedure :
1. set both the minDigits- and maxDigits-value to 2 (Attention: please change nothing else, neither in formatting, nor in adding a row, a tab or only a carriage return or something else.),
2. copy the complete text from within your wordpad,
3. clear the complete XML-window,
4. paste the changed XML-code in the most upper window (make sure you did not leave out any row/character of the changed XML),
5. click Set XML
6. do not save the report immediately, go back to the result-tab first and check the outcome. Now, if all went well save your report.
So, you have OBIEE showing the value properly the way you want.
I thought I found the standard-setting for the "percent-of"-function within the file pivotvieweditor.js sitting in the directory \oracleBI\web\app\res\b_mozilla\views\, but despite there are values hard-coded for <minDigits> and <maxDigits> in the function "PTCreatePercentOf" unfortunately it doesn't effect new PercentOf-columns in Pivots. Anyhow I do not give up and will find and post it as soon as I got something.
So, that's for today. Have a good time and so long,
Andreas