Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Oralce Decode function in Qlikview chart expression???

I am not sure, how to write this in Qlikview chart expression.

SUM(DECODE(INDTRANS,'T',0, NUMCTNCM))

with the following conditions:

//" ( ACUMTEMP ) = 'MTH' )
// AND
// ( ( IDESCENA ) = '01' )
//and
// SI_MDJ_PGES_L.CODJEN2 = '10070000' AND SI_MDJ_UNEG_L.CODJEN4 = '04010000'
// AND
// SI_MDJ_PGES_L.CODJEN3 = '30000000' AND ( ( SI_MDJ_CRIT.CODJEN3 ) = '30010' )"


I tried the following, but not able to satify the criteria....

  //This expression is not fully developed....

SUM

({<ACUMTEMP={'MTH'},IDESCENA= {'01'},SI_MDJ_PGES_L.CODJEN2 = {'10070000'},SI_MDJ_UNEG_L.CODJEN4={'04010000'},SI_MDJ_PGES_L.CODJEN3 = {'30000000'},SI_MDJ_CRIT.CODJEN3={'30010'}>} NUMCTCCM)


You help is greatly appreciated.... Thanks in advance for all your help.

Regards

Siva

1 Solution

Accepted Solutions
maxgro
MVP
MVP

add the bold

SUM( {<ACUMTEMP={'MTH'}, IDESCENA= {'01'}, SI_MDJ_PGES_L.CODJEN2 = {'10070000'}, SI_MDJ_UNEG_L.CODJEN4={'04010000'}, SI_MDJ_PGES_L.CODJEN3 = {'30000000'}, SI_MDJ_CRIT.CODJEN3={'30010'},

INDTRANS-={T}>} NUMCTCCM)

View solution in original post

6 Replies
yura_ratu
Partner - Creator II
Partner - Creator II

Hi Siva,

Could you explain what result what do you want to get. I guess it would be faster. Not everybody here is Oracle guru

maxgro
MVP
MVP

add the bold

SUM( {<ACUMTEMP={'MTH'}, IDESCENA= {'01'}, SI_MDJ_PGES_L.CODJEN2 = {'10070000'}, SI_MDJ_UNEG_L.CODJEN4={'04010000'}, SI_MDJ_PGES_L.CODJEN3 = {'30000000'}, SI_MDJ_CRIT.CODJEN3={'30010'},

INDTRANS-={T}>} NUMCTCCM)

Not applicable
Author

To make it simple to understand.... please check the following

SUM(DECODE(INDTRANS,'T',0, NUMCTNCM)) means

sum ( if(INDTRANS='T', 0, NUMCTNCM))

Not applicable
Author

Hi Massimo,

Thanks a lot for your response.

It seems your expression is correct... You really saved my day...i will get back to you after results getting verified.....

Regards

Siva


sgrice
Partner - Creator II
Partner - Creator II

Closest match to decode is

pick() and match() used together

pick(match(myFIELD,'john','bob','fred'),'Yes yes John','No No bob','ok fred')


Not applicable
Author

Massimo,

Excellent....Its working correctly....Thanks for all your help. I have marked as Helpful answer, as i dont see any option to select as the correct answer.....Its strange... but Very sorry about that...

Regards

Siva