Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

If function

I have a Qlikview table containing  various products. All products are in pieces . All products have an extra code  ' APP ' ' RES ' ' FOR' or ' SUB * . In one column called ' Frysere ' I only want products of the type ' APP ' .I can't just select APP because the other columns contains other then APP and i need it to be like that.


I have tried this line in properties in the column.



if(match(varegruppe,'APP' = Sum( {$<Process_Gruppe = {'Frysere' } >}Salgsantal))


The part of the line works fine


Sum( {$<Process_Gruppe = {'Frysere' } >}Salgsantal))



Do you have some some good ideas

Tags (1)
1 Solution

Accepted Solutions
er_mohit
Honored Contributor II

Re: If function

Hi

In Set Analysis just write

Sum({<Process_Gruppe= {'Frysere' }, VareRabatGr= {'APP'}>}Salgsantal)


Regards

Mohit

7 Replies
MVP
MVP

Re: If function

Not sure if I understand your request, but maybe like this?

=Sum( {$<Process_Gruppe = {'Frysere' }, varegruppe= {'APP'} >} Salgsantal)

Not applicable

Re: If function

Sorry it doesn't work.

I have 10 columns and 3 of the columns need to be restricted to *APP' I have added the column varegrupper to show you that i doesn't work. Capture.JPGexpres.JPG

Frysere.JPG

Not applicable

Re: If function

Hi swuehl

You made me look in the right direction. The line that works is

Sum(if(Process_Gruppe='Frysere' And VareRabatGr='APP',Salgsantal))


Best regards

Re: If function

Do you have spaces before and after the word APP? May be this if you do:

Sum( {$<Process_Gruppe = {'Frysere' }, varegruppe = {'*APP*'}>}Salgsantal))

er_mohit
Honored Contributor II

Re: If function

Hi

In Set Analysis just write

Sum({<Process_Gruppe= {'Frysere' }, VareRabatGr= {'APP'}>}Salgsantal)


Regards

Mohit

Re: If function

This should work as well and should be better performing then the if statement:

Sum({<Process_Gruppe = {'Frysere'}, VareRabatGr = {'APP'}>} Salgsantal)

MVP
MVP

Re: If function

Glad that you found your solution, always double check field names in set modifiers or expressions in general, Qlik is case sensitive with regard to field names (and the field name must exist in you model ).