Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
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
Luminary Alumni
Luminary Alumni

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
Luminary Alumni
Luminary Alumni

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