I am creating a document that has a table which is replacing an excel report that a department currently gets daily.
I need to have the table in Qlikview, formatted to the way they are used to seeing it in the daily Excel report and I am trying to accomplish this formatting in the script so I do not have to repeat it in each table it is used in, in the Qlikview document
The problem is, I can't seem to match the format. See table below for example.
The values need to only go out to 3 spaces after the decimal point, but ONLY if it has values for those three spaces (see how Items "ACB" and "AEB" have values after the decimal but not 3 spaces out so it shortens it to either 2 or 1 spaces)
Then if the value is 0, it just needs to be "0", not "0.000".
I tried using this format below but it did not give me the results I wanted.
Is this even possible in Qlikview?
perhaps like that?
LOAD * INLINE [
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.
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.
You really shouldn't have to do anything special.
Format as number without specifying precision.
Are you selected a decimal place on the number tab?
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.