Search code examples
oracleoracle11gobiee

Custom data format in OBIEE - Showing decimal when double, no decimal when integer


I have measure column, which I am using for pivoting, and I have also used New calculated items. Now the new calculated item is to return data in double format,which is percentage, but the other results is to return data in integer. If the data format of the column is decimal then the measure column, which are integers would show data with decimals (so 2 becomes 2.00), and if i keep it integer then decimals from the percentage column would be removed (so 45.28% becomes 45%). Can the data format of the column be changed such that when there are decimal, then decimals are returned and when whole numbers, whole numbers are returned (without the .00s)?

Expected Result

A    B     (A/B)*100
2    6      33.33 

Note that A and B are coming from the same column, and the (A/B)*100 is my New Calculated Item.


Solution

  • Criteria tab / Properties / Data format and select "up to 2" in decimal places. This option excludes the ".00" for integer values.

    up to x decimals