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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Mattia
Creator II
Creator II

How can i correct this expression in the script?

Hi QV users,

i've a problem with the following expressions in the script:

KEY_TO_VALORE_PRESTAZIONE:
Mapping LOAD
[@10:17] as CONTATORE_PRESCRIZIONE,
[@37:45] as VALORE_PRESTAZIONE

Num(If([@306:306]=0, if(ApplyMap('KEY_TO_VALORE_PRESTAZIONE',[@37:45],'n/a')>0,Num(Left([@37:45],7)&','&Num(Right([@37:45],2),0))))) as VALORE

The output i want to obtain is a new field called "VALORE" that if the field [@306:306] contains the value "0", return the first 7 numbers of the field [@37:45], a comma, and the last 2 numbers of the same field.

Please, can someone show me the right direction?

Thanks,

Mattia

Labels (2)
2 Replies
jobsonkjoseph
Creator III
Creator III

Hi,

instead of applymap;

Can you try if the below code works out, i'm not so sure, but can try;

CASE WHEN([@306:306]=0) then left([@37:45],7) &','&right([@37:45],2) else 0 as VALORE

Mattia
Creator II
Creator II
Author

Hi Jobsonkjoseph,

sorry, but in QV i don't find the CASE WHEN statement.

Can you give me any other suggest?

Thanks,

Mattia