I faced a strange issue in obiee report today. Col 1 and Col2 were having some values in each row but doing (Col1/Col2)*100, was returning ZERO for all rows.
I tried to set Column Properties > Data Format to 2 decimal places (shown in pic) but didn’t work.
Then, I applied ROUND on formula to round-off data upto 2 decimal places but again it didn’t work.
Finally, I extracted the physical query (Administration > Manage Sessions > View Log (of your report) ) (shown in pic)
Here i found the reason. OBIEE was applying FLOOR function to the formula where i was dividing an INTEGER by another INTEGER. (shown in pic)
Solution 1:
Use CAST function to convert INT to DOUBLE. and then you can use ROUND need basis. If you don’t want result in decimals then apply ROUND (expr , 0).
Solution 2: Go to Rpd > Physical layer > Database Properties
Find FLOOR and uncheck the box under ‘Value’ column (shown in pic) and then SAVE rpd.
Please note before making any changes take a back-up of rpd. Don’t make changes directly to PROD environment. Try in lower environments first.
I hope this will solve the issue.
Please comment for any doubts/help.
Thanks
Akash Garg