Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

Avoid conversion to number of text field by setting

Hi All

I want to interprete values with a preceeding "+" as text and not as numbers. E.g.:

a:
LOAD * INLINE [
should_be_text
+1
];
LOAD * INLINE [
should_be_text
1
];

I end up with 1 value "+1" only instead of 2 values "+1" and "1".

How can I get 2 values without using TEXT(should_be_text) conversion? Is there a general Qlikview setting?

Thx - Marcel

1 Solution

Accepted Solutions
Digvijay_Singh

I don't think there is such setting to change interpretation of numbers to text. I think TEXT function is the way to treat any number as text. Lets see what we get here from experts.

View solution in original post

4 Replies
Digvijay_Singh

I don't think there is such setting to change interpretation of numbers to text. I think TEXT function is the way to treat any number as text. Lets see what we get here from experts.

stabben23
Partner - Master
Partner - Master

Hi,

the problem here is that qlikview handles that +1 and 1 is the same.

When qlikview find +1 in the first load, qlikview also think that 1 in second load should be +1.

if you for example change +1 to 01, qlikview think that both values will be 01.

Text is the only way that I know.

MarcoWedel

Do you expect both "+1" and "1" having the same numeric value of 1 in the same field?

marcus_sommer

I don't think that it is possible just by loading the data like you describe it. But you could query the content and adjust the output maybe with something like this:

load

     if(mid(F1,1,1)='+', text(F1), F1) as F1,

     replace(F1, '+', chr(160) & '+') as F2

inline [

F1

+1

1

];

Speaks anything against such an approach?

- Marcus