There is a field (decimal datatype from hive) with value like: 101110110 (only 0 and 1 in every digit). 1. I would like to create calculated fields in ad hoc views and extract every position from this value 1,0,1,1,1,0,1,1,0 2. I would like to get the count of '1' from this hive field, so the count is 6 for this example. I tried to use java function String.valueof(), replace() in the calculated field, and it failed the validation. There are no function to convert decimal to string or replace strings in Jasper report server for adhoc view calculated fields. We can't change the datatype to string in hive. How can I create these calculated fields? Please help. Thank you.