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: 
vardhancse
Specialist III
Specialist III

Calculated Field

Hi,

Have a requirement is that, need to create one field based on if condition.

Can any one let me know

4 Replies
Not applicable

Hi,

Just create a list box, go to "General" sheet, find and open Field Combo Box and select "Expression" at the end of list, then you have to tip something like this:

If (Condition 1,

     Result1,

     Oposite Result

)

Example I need 1 if Sex Value is Male and 2 if is Female so I use:

If(Sex='Male',

     1,

     2

)

and if I have nulls I can use:

If( Sex = 'Male',

     1,

     If(Sex='Female',

          2,

          0 // To identify nulls values

     )

)

Best regards.

pgrenier
Partner - Creator III
Partner - Creator III

Hello Sasi,

Could you be more specific? Otherwise, you might want to check QlikView's help function by hitting the F1 key and entering "If" in the Index field.

Regards,

Philippe

its_anandrjs
Champion III
Champion III

Yes possible but please elaborate more which type of field or what condition you want to create the field.

vardhancse
Specialist III
Specialist III
Author

requirement is that

in chart has written set analysis as =sum({<[Time]={'$(vMaxDate)'}>}[Field])

Let vMaxDate=MAx(Time)

sum(if(max(Time),(Field)) as Count