Format number to 2 DPs
SpeedySteven
Super Learner
I have some data that I'm importing and I want to convert to currency format nnn.nn  there doesn't appear to be a way to do this in aperture. Any ideas? I've tried the Round function but no joy  I want to convert 28 to 28.00 etc.
0
Best Answer

Henry Simms Administrator
@SpeedySteven I noticed that the reusable formula was exported from a Data Studio 2.4.2 environment. These packages are typically not backwardscompatible, so if you have an earlier version of Data Studio you will probably find that you can't import. Any version 2.4.2 or later should be fine.
0
Answers
The last proposed solution in the thread is probably the most complete.
Thanks Henry  that's really helped  I can't seem to save the reusable formula though
Thanks Henry  we need to upgrade
@SpeedySteven This function ought to do what you want, without any need to upgrade anything.
How it works ...
This function takes an input parameter (called inNumber)
Multiply inNumber by 100 and round it to zero decimal places (using HalfEven rounding)
Save the rounded number as a variable "RoundNum"
We're then going to chop this number up into 2 bits  the right two digits (let's call that RightBit) and everything else (LeftBit).
We then concatenate these two bits either side of a decimal point and save it in the variable outString : LeftBit.RightBit
This works for any number except zero, which ends up as ".0", so we have to handle zeroes as a special case, so we check to see if the outString = ".0" and if it does we return "0.00", if not we return outString
Test Data
@SpeedySteven Here's a function that does what you want without needing to upgrade anything.
How it Works
This function takes an input parameter (called inNumber)
Multiply inNumber by 100 and round it to zero decimal places (using HalfEven rounding)
Save the rounded number as a variable RoundNum
We're then going to chop this number up into 2 bits  the right two digits (let's call that RightBit) and everything else (LeftBit).
We then concatenate these two bits either side of a decimal point and save it in the variable outString = LeftBit.RightBit
This works for any number except zero, which ends up as ".0", so we have to handle zeroes as a special case, so we check to see if the outString = ".0" and if it does we return "0.00", if not we return outString
Test Data
@SpeedySteven This function does what you want without needing to upgrade anything.
How it Works
This function takes an input parameter (called inNumber)
Multiply inNumber by 100 and round it to zero decimal places (using HalfEven rounding)
Save the rounded number as a variable RoundNum
We're then going to chop this number up into 2 bits  the right two digits (let's call that RightBit) and everything else (LeftBit).
We then concatenate these two bits either side of a decimal point and save it in the variable outString (LeftBit.RightBit)
This works for any number except zero, which ends up as ".0", so we have to handle zeroes as a special case
So we check to see if the outString = ".0" and if it does we return "0.00", if not we return outString
Test Data