Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Best practice with numbers question

Hi,

I have a application that loads EAN's, if I display these in a chart as is I get 9.0124571e+012, to display these correctly I have to use =num(EAN). I was wondering is it best to do this at load time or in the chart. Also is it best to tell QlikView what fields are numbers in the load or let it work it out itself, if it is best to let it know, what it the best way to do that.

Thanks,

Gavin.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Generally speaking, I try to get all of my values in the desired or most common format during the load. I like to do it explicitly in the script, but another approach is to go into settings, document properties, number tab, format it like you want it, and put a checkmark in "survive reload". Either way you do it, it's easier to format once than to format every time you need the value.

View solution in original post

3 Replies
Not applicable
Author

Hi Gavin

I would generally leave the load script to sort itself out because it's pretty good at doing that, the example you have identified above is one of the few times that I would force the load script to convert this to text, just because I wouldn't want to repeat the Num(EAN) expression every time I want to use it.

I have not used this before so you might want to check the syntax, but I think in the load script it would be something like:

LOAD Text(EAN) AS EAN_Ref

As I say, you might want to check the syntax of that one.....

Good luck,

johnw
Champion III
Champion III

Generally speaking, I try to get all of my values in the desired or most common format during the load. I like to do it explicitly in the script, but another approach is to go into settings, document properties, number tab, format it like you want it, and put a checkmark in "survive reload". Either way you do it, it's easier to format once than to format every time you need the value.

Not applicable
Author

Thank you both for your advice,

Gavin