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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with number format

Hi

I am currently trying to learn Qlikview with the help of the book "Qlikview your business" by Oleg Troyansky. It is a brilliant book and Qlikview is amazing. I was really a die hard Excel fan before but Qlikview really has a way of automating and visualising large volumes of data that Excel just cannot.

However, I have come across a tedious and "stubborn" problem. It is related to the way the numbers are formatted. I am trying to use a dynamic number formatting whereby if the number is divided by a million, it shows one decimal, otherwise it just shows without a decimal. I have been trying to follow the examples of the book and the final solution file from the book is attached here (called 08.31 Profitability Analysis). My own version is showing a very different number format. I have included am input with the pre-defined values 1; 1000 and 1000000. In the variables that I use for my formulas, I have included that the value should be divided by the number in the input box. And then I have created a variable that gives a certain format if I divide by a million, another format if I divide by a thousand and so on.

The problem:

If I divide the figure by 1.000.000 (one million), it shows me a format of ##,###.0 instead of the #,##0.0 that I have assigned to the variable.

For instance, the Sales at list value for 2013 is 57,802,562.91 USD. Dividing by 1 Million, I would like to see 57.8. If I divide by a thousand, I would like it to be 57,803 and so on - just like in the file 08.31 Profitability analysis.

In Oleg's file it is working perfectly. However, if create a new file and just copy all the variables from his file into the new file, again it doesn't work. What am I doing wrong?

I am starting to think that since my computer has Swedish settings whereby a thousand separator is a space instead of a comma and a decimal is a comma instead of a point - that that might have something to do with it.

I hope I can get some help since I am stuck here and have been so the last 2 days.

Kind regards

Christoffer

3 Replies
swuehl
MVP
MVP

Try adding an explicite separator definition list to your num() functions, like in

num(

(sum([# Amount at List Price]))/vUnit

,'$(fmt_PL)','.',',')

Not applicable
Author

Hello swuehl

thanks a lot for your very quick reply. It worked fine :-). Also, I have learned something new for the future when it comes to number formatting.

Again thank you and have a great day!

Kind regards

Christoffer

swuehl
MVP
MVP

Hi Christoffer,

you're welcome.

If your request is resolved, then please consider closing this thread:

Qlik Community Tip: Marking Replies as Correct or Helpful