Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mambi
Creator III
Creator III

evaluate row content

Hello,

i'm connecting qv with mysql db and i have a varchar field like this :

Column:

10+22

3-4

15+10

...

in the load script  or in a chart i want to evaluate each row so i'll get :

Column

32

-1

25

i don't want to use subfield in the load script because it duplicate rows.

the function evaluation returns 0.

any idea how to do it ?

17 Replies
mambi
Creator III
Creator III
Author

tried this but no result,

now even if i reload your document i'm getting 0

mambi
Creator III
Creator III
Author

which version of qv are you using please ?

Anonymous
Not applicable

QV11.20 SR8

mambi
Creator III
Creator III
Author

i'm using QV11.20 SR2

can we get the same result with a chart ( without using evaluate function) ?

MarcoWedel

Hi,

one front end solution could be:

QlikCommunity_Thread_203656_Pic1.JPG

=Pick(Match(column,'$(=Concat(column,chr(39)&','&chr(39)))'),$(=Concat(column,',')))

hope this helps

regards

Marco

mambi
Creator III
Creator III
Author

thank you for your help Sir,

but what if i have a large set of data -> performance ?

is there any solution to do it via the loading script ?

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi ,

Evaluate() function will work. but still problem with Evaluate(), then use below script

Load *,

if (mid(column,FindOneOf(column, '+-*/')) ='+',

Left(column,FindOneOf(column, '+-*/') -1)+Right(column,len(column)-FindOneOf(column, '+-*/') ),

if (mid(column,FindOneOf(column, '+-*/')) ='-',

Left(column,FindOneOf(column, '+-*/') -1)-Right(column,len(column)-FindOneOf(column, '+-*/') ),

if (mid(column,FindOneOf(column, '+-*/')) ='*',

Left(column,FindOneOf(column, '+-*/') -1)*Right(column,len(column)-FindOneOf(column, '+-*/') ),

Left(column,FindOneOf(column, '+-*/') -1)/Right(column,len(column)-FindOneOf(column, '+-*/') ) ))) as New_column

Resident table;

mambi
Creator III
Creator III
Author

Thanks a lot for your help,

it also works but what if i have 10+23+14+.... (NB : in the same row i have only one sign + or - )