Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
stekol61
Creator
Creator

Expression format

Hi!

 

I have a QlikView app that presents some values in textboxes.

An example of a value presented is:
'=num(sum([Voice Traffic (Minute)]),'# ##0')'

Earlier the result presented was e.g '541 423 300' but now it's presented as '451424300##0'

The report has several textboxes presenting different value and all of them now has this strange format

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

A format like: 

=num('123456','# ##0')

will only produce a valid result if the the ThousandSep is set to " " ( space).  That separator can be set in one of two ways.

1. As a parameter of num():  =num('123456','# ##0',',',' ')

2. By setting the ThousandSep variable in the script:

SET ThousandSep=' ';

If it is not specified,  it will default to the windows system setting.  You can see what the current ThousandSep value is for your qvw in Help. Document Support Info.  Take a look at your value. I expect it is not " ".

Since you indicate the script does not use SET ThousandsSep, I think the source of your problem is that your document has reverted to a system default.  That could happen if for example you created a new document and copied the objects over, or perhaps even if you move the document to a machine with a different windows locale.

I think it's a best practice to always include the standard SET variables to be explicit about what the document is expecting for formatting.

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

7 Replies
sunny_talwar

Did you upgrade the version of QlikView that you have been using?

stekol61
Creator
Creator
Author

Not as far as i know

sunny_talwar

Are you saying that one day the text box was showing the right format and the next day they got messed up without anybody making any change? Somebody might have made some kind of change...

AmanBohra
Contributor II
Contributor II

Have a check over the system SET variable in the main script sheet, is it same as earlier when it was giving you desired output.
Thanks & Regards,
Aman Bohra.
stekol61
Creator
Creator
Author

this app has never used any SET variable

AmanBohra
Contributor II
Contributor II

Can you share the discussed application file here, to have a close look over the problem statement and understand it root cause.
Thanks & Regards,
Aman Bohra.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

A format like: 

=num('123456','# ##0')

will only produce a valid result if the the ThousandSep is set to " " ( space).  That separator can be set in one of two ways.

1. As a parameter of num():  =num('123456','# ##0',',',' ')

2. By setting the ThousandSep variable in the script:

SET ThousandSep=' ';

If it is not specified,  it will default to the windows system setting.  You can see what the current ThousandSep value is for your qvw in Help. Document Support Info.  Take a look at your value. I expect it is not " ".

Since you indicate the script does not use SET ThousandsSep, I think the source of your problem is that your document has reverted to a system default.  That could happen if for example you created a new document and copied the objects over, or perhaps even if you move the document to a machine with a different windows locale.

I think it's a best practice to always include the standard SET variables to be explicit about what the document is expecting for formatting.

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com