Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
can you upload this input file or a sample file showing the same effect?
Hi,
Just loaded it into mine and Text() function works for me.
Mark
When i am loading same, I am not seeing any variation with samplee.
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)
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
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.
Read this for more info: Automatic Number Interpretation.
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?