Hi everyone, somebody have the syntax to covert integer value to floating point in PI AF (Analyses)?
Can you use float('attribute')?
Hi Javier Cepeda
Have you tried Tim Carmichael 's suggestion. Did it work for you? If so could you mark your post as being answered?
This may not be the ideal solution, but depending on your needs it will output a string datatype representing a floating point number that can then be converted to a 'Double' AF Datatype:
Format('INTEGER_BASED_ATTRIBUTE', "00.2f") NOTE: 2f for two decimal places, 3f for three decimal places, etc.
For example: Format('Load_Count', "00.2f") -- if Load_Count is equal to 16, then the output will be 16.00 as a string datatype. This 16.00 can then be converted to a number using Tim's suggested Float(16.00). I admit it is a rough workaround, but you technically end up with a floating point value.
Retrieving data ...