Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
stekol61
Contributor

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
MVP & Luminary
MVP & Luminary

Re: Expression format

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

7 Replies

Re: Expression format

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

stekol61
Contributor

Re: Expression format

Not as far as i know

Re: Expression format

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
New Contributor II

Re: Expression format

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
Contributor

Re: Expression format

this app has never used any SET variable

Highlighted
AmanBohra
New Contributor II

Re: Expression format

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.
MVP & Luminary
MVP & Luminary

Re: Expression format

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