Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
xavierwiltbank
Contributor II
Contributor II

How to load in 3.00 as a string, not a number

I'm having issues with my load script loading in what would look to be a numerical field.

I have a file with a column "Field1"

Where Field1 has the values

Field1

1

2
898
3.00
3.01

I'm essentially running:

Load

     Text(Field1) as Field1

From File

When the data loads in, I get 1, 2, 898, 3, 3.01

I want the 3.00 to load in as a string (I want all of these to load in as a string.)

But Qlik Sense chops off the .00, which would make sense if I was loading in as a number, but I want to specify Text. Is there a way to do this?

Thanks!

8 Replies
swuehl
MVP
MVP

can you upload this input file or a sample file showing the same effect?

Mark_Little
Luminary
Luminary

Hi,

Just loaded it into mine and Text() function works for me.

Mark

Anil_Babu_Samineni

When i am loading same, I am not seeing any variation with samplee.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tcullinane
Creator II
Creator II

This is smart parsing not being very smart, I've run into similar with 1- being interpreted as -1 and 1+ being interpreted as 1.

It cant be turned off so it can take a bit to figure out, try loading the table without the  text() then resident load the table with text(field1) as field1.

(This was a change with qv12, it behaved differently before)

xavierwiltbank
Contributor II
Contributor II
Author

I've ran a test with a test file (not the actual file) and the Text function seemed to work correctly. I'm going to look into the file I'm using to see if there is anything in there that is causing problems. Thanks for the feedback guys! If I learn more I'll post an update. Unfortunately tcullinane's idea did not work for my case, but a useful troubleshooting step for sure.

Thanks!

~Xavier

juraj_misina
Luminary Alumni
Luminary Alumni

I guess this is a cause of Dual "datatype" used by Qlik, where a value can have a numeric and a string representation. When you load data into your app, records are assigned respective numeric and string representations. However, each numeric representation can have only one corresponding string representation. So I guess what is happening in your case is there is '3' as well as '3.00' in your data and '3' simply comes first, so when '3.00' is loaded it is simply assigned already existing value '3'. As tcullinane‌‌ mentioned, this can't be turned off. Sometimes you simply have to be super extra creative when loading data. It drove me crazy as well in one project and I was lucky that my client changed data source in the process so the issue disappeared for me.

juraj_misina
Luminary Alumni
Luminary Alumni

Read this for more info: Automatic Number Interpretation.

NZFei
Partner - Specialist
Partner - Specialist

What is your actual data source?

Which Sense version are you using?

Works for me to load from a test spread sheet by using Text function.

Have you tried using dual first and then text function like this?