Todd Crites Posted April 24, 2018 Share Posted April 24, 2018 Is there really no truncate function in Spotfire I'm looking to take decimals like 76.996 and truncate to 76.9 instead of rounding to 77.0. How would I go about doing this I would use "Trunc(76.996,1)" in Excel and get 76.9. Any suggestions Link to comment Share on other sites More sharing options...
Grazia Palmisano Posted April 20, 2020 Share Posted April 20, 2020 have you found a solution to do the trunc and not the round Link to comment Share on other sites More sharing options...
Todd Crites Posted April 20, 2020 Author Share Posted April 20, 2020 Unfortunately no, no response here and I didn't find anything otherwise. Sorry about that. Link to comment Share on other sites More sharing options...
Shashank Gurnalkar Posted April 21, 2020 Share Posted April 21, 2020 As a workaround, can you try this and let me know if this helps 1. Convert the formatting of the column from the default 2 decimals to 3 decimals from Column Properties >> Select the column >> Formatting tab >> Number >> Under Decimals, select 3 from the drop-down and click OK. 2. Create a calculated column with the following expression. Integer(Substring(String(Integer([Data] * 1000)),1,Len(String(Integer([Data] * 1000))) - 2)) / 103. Change the formatting of this calculated column to 1 decimal place. It will look something like this. Link to comment Share on other sites More sharing options...
Grazia Palmisano Posted April 21, 2020 Share Posted April 21, 2020 The formatting property execute the round of value Link to comment Share on other sites More sharing options...
Todd Crites Posted April 21, 2020 Author Share Posted April 21, 2020 Thank you, this does give the desired result. I appreciate you sharing this. I hope Tibco understands how silly it is to have to go to this length to 'truncate' when competitive tools have simple TRUNC() functions. It's probably not high on their radar, but small things like this do make a difference in the eyes of the users. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now