Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
k_holt69
Contributor III
Contributor III

SET NumberFormat=

Hi

In the Main Section we can set various default formats eg SET TimeFormat='hh:mm:ss';

Is it possible to do the same for number format to a set number of decimal places such as SET NumberFormat='###0.000';

 

Thanks in advance

 

 
Labels (3)
1 Solution

Accepted Solutions
Or
MVP
MVP

Unless this is a hidden feature, I don't think there's a variable for that. The ones generated at the top of every new app match the list of ones available per the documentation.

https://help.qlik.com/en-US/sense/May2023/Subsystems/Hub/Content/Sense_Hub/Scripting/NumberInterpret...

 

View solution in original post

5 Replies
Or
MVP
MVP

Unless this is a hidden feature, I don't think there's a variable for that. The ones generated at the top of every new app match the list of ones available per the documentation.

https://help.qlik.com/en-US/sense/May2023/Subsystems/Hub/Content/Sense_Hub/Scripting/NumberInterpret...

 

k_holt69
Contributor III
Contributor III
Author

Thanks Or, was looking for an alternate to using num#(num_field,'###0.000').

I'm getting the data from excel with a number of fields that have more than 2 decimal places and was hoping I could set it as a default rather than having to write the above for every field I need to change.

 

 
Or
MVP
MVP

You could use Floor() or Round() rather than Num#, which would make more sense if the value is already numeric, but otherwise I don't think there's a quick hack for this during the preliminary load process. You could loop through the fields and do this, but it seems like it would just make life harder, not easier.

Chanty4u
MVP
MVP

Try this 

SET NumberFormat='###0.000';

In your expression 

Num(Sum(Sales), '###0.000')

 

k_holt69
Contributor III
Contributor III
Author

Hi Chanty4u.

Thanks but unfortunately this isn't what I was looking for. I'm looking to avoid using expressions and set a default format for all number fields