Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
fmazzarelli
Partner - Creator III
Partner - Creator III

sum + case

hi,

I would make the sum of two fields conditioned by another value
example :
case white

     sum(1+10):

case red

     sum(2+20)

else

     sum(3+20)


11 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,


Try like this


Pick(WildMatch(FieldName, 'white', 'red', '*'),

     Sum({<field -= {'VALUE'}>}),

     Sum({<field -= {'VALUE'}>}),

     Sum({<field -= {'VALUE'}>}))


Qlikview compiler will show the above expression as error but it works, because -= it will show error.



Hope this helps you.


Regards,

Jagan.


jagan
Luminary Alumni
Luminary Alumni

Hi,

If you got the answer please close this thread by giving Correct Answer to the useful post.

Regards,

Jagan.