You can use the frac() function to check if the number has a fraction portion and then do the formatting.
See the attached file to see if it helps you.
Sample.qvw 147.8 K
I see how you used the fraction function... but it changed the numbers to the format that I'm already getting?
I want them to look like they do in the table example, without the "0"s after the decimal?
Instead of "158.200", I want it to be "158.2" only.
I can try and use the fraction function to accomplish this though.
Just replace the num() formatting for something like (attached file has an example):
round([Item Requirements],0.001), where the 0.001 is the offset as to how much rounding you want.
Sample_v2.qvw 147.8 K
It might not be the most efficient solution but you can try something like this for the field in the script containing the number:
Load * Inline
Round(Val,0.001)) as Val
Drop Table Table1;
If I understand you correctly, you will only need to apply function Num(). I used various variant of numbers in the two fields (number field and text field) Excel file (see attached files) - point and comma as delimiters, different of digits.
In attached files source data and example for QlikView/Qlik Sence.