Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
FernandaNava
Partner - Contributor III
Partner - Contributor III

Telling apart datatypes on same field

I'm working on data that contains a column that corresponds to results from different tests. Problem is, some of them have a numeric value, while others are only "negative" or "positive"  I think QlikSense may be able to tell them apart since it formats them accordingly on tables. I was wondering if there is a way in which I could flag numeric values and strings during load so I can work them separately. I know I could probably do something directly on the database but I wanted to check first if there's a workaround using qlik. 

 

Captureff.PNG

 
Labels (3)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

You can use isNum()

 

image.png

Example:
LOAD
  RowNo() as RowID,
  Esito,
  IsNum(Esito) as [Esito is numeric]
inline [
  Esito
  7.6
  24
  8.5
  107
  1.92
  0
  0 
  0
  4.2
  142
  22
  NEGA - Negativa
  0
  0
  NEGA - Negativa
  NEGA - Negativa
  NEGA - Negativa
];

View solution in original post

2 Replies
Vegar
MVP
MVP

You can use isNum()

 

image.png

Example:
LOAD
  RowNo() as RowID,
  Esito,
  IsNum(Esito) as [Esito is numeric]
inline [
  Esito
  7.6
  24
  8.5
  107
  1.92
  0
  0 
  0
  4.2
  142
  22
  NEGA - Negativa
  0
  0
  NEGA - Negativa
  NEGA - Negativa
  NEGA - Negativa
];

FernandaNava
Partner - Contributor III
Partner - Contributor III
Author

This is exactly what I needed. Thank you!