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: 
Anonymous
Not applicable

Convert Numeric field to Text in Script

We have SKU, which appears in many tables, that are 14 digit numbers (ex: 10071179001233). When exporting to Excel it turns to scientific notation. Is there anyway in the script to convert every occurrence of the SKU field that gets loaded to be converted or CAST to text?

5 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

You can try loading it as Text in the first place:

LOAD text(SKU) as SKU,

...

...

FROM ....

Then SKU will be loaded as Text file in QlikView dcument itself. Should export to Excel fine then.

Anonymous
Not applicable
Author

Thanks for the reply Rakesh. Yes, that changed it to text but it still went to Excel as a number.

Anonymous
Not applicable
Author

I ended up just using this as the dimension expression in the chart I'm exporting. Not very elegant but it works.

=text(SKU&Chr(32))

disqr_rm
Partner - Specialist III
Partner - Specialist III

Strange! But atleast you found a workaround. I wouldn't do it in the dimensin though. I would rather create another field ad load it as TEXT(SKU & chr(32)) as SOMETHING, and then use SOMETHING in the dim. That will keep my chart faster atleast.

Anonymous
Not applicable
Author

That didn't work either for some reason. So I just assigned that calculation to a variable and use the variable in each object that I need SKU. Thanks for you help.