Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
PhilipMertin
Partner - Contributor III
Partner - Contributor III

Qlik Sense Num format with thousand separator and decimal places

I'd like to know why you can't format a number with a thousand separator and decimal places in Qlik Sense, but you can in Qlikview. I find this so strange and frustrating..

i.e. num(sum($(vOnhand2)),if(vDisplay='QTY PRIMARY UNIT','# ##0','# ##0.000'))

The latter returns a number that looks like this on the front end: "123456 ##0.000"

Labels (2)
6 Replies
tresesco
MVP
MVP

It could be because one supposed to be space character in your format is not really being read as space but something else. Try to remove that from format, and then press space bar in expression itself. 

PhilipMertin
Partner - Contributor III
Partner - Contributor III
Author

Hi.. I've done that and it makes no difference unfortunately. I use a normal space.

tresesco
MVP
MVP

Space is causing the issue it seems. You can try a work around like:

Replace(Num(1234.5,'#,##0.000'), ',', ' ')

PhilipMertin
Partner - Contributor III
Partner - Contributor III
Author

Makes no difference.. My expression now looks like this:

num(sum($(vOnhand2)),if('$(vDisplay)'='QTY PRIMARY UNIT','# ##0',
replace('#,##0.000',',',' ')
))

Makes sense that it won't make a difference, as a space didn't work in the first place. Now we're trying to replace a comma with the space that didn't work in the first place.

I doubt it's got anything to do with the space.. I think Qlik Sense has a shortfall here and it's really bad. Doesn't seem to be able to handle formatting using an expression like this.

tresesco
MVP
MVP

Replace() has to be outside num().

PhilipMertin
Partner - Contributor III
Partner - Contributor III
Author

Still doesn't work. Now the thousand separator disappears from the number..