Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
saivina2920
Creator
Creator

How to add more conditions in the IF statement expression

I have to add more conditions in the if statement. How to add this. 

 More conditions :  [FROM]={'*MARIAM*'},[EMPSTATUS]={'Current'},[TO]="$(vPlaces)"

below is my expression

Exp1 ("Relieving Date"):

=If(vUserInput, if(IsNull(EMP_RELIEVE_DATE), Date(EMP_RESIGN_DATE+vUserInput)), if(not IsNull(EMP_RELIEVE_DATE), EMP_RELIEVE_DATE))

Exp 2 : (1-10days)

If([Relieving Date]>=vCalDate10 And [Relieving Date]<=vToday, 1,0)        // 'Relieving Date' is label to previous exp.

vToday ==> =date(Today(),'DD/MM/YYYY')

vCalcDate10 ==> =Date(vToday-10,'DD/MM/YYYY')

Labels (1)
15 Replies
Anil_Babu_Samineni

Try this way whereever it is with "EMP_RELIEVE_DATE"

Only({<[FROM]={'*MARIAM*'},[EMPSTATUS]={'Current'},[TO]={"$(vPlaces)"}>} EMP_RELIEVE_DATE)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
saivina2920
Creator
Creator
Author

below highlighted is ok...?

=If(vUserInput, if(IsNull(EMP_RELIEVE_DATE), Date(EMP_RESIGN_DATE+vUserInput)), if(not IsNull(EMP_RELIEVE_DATE), Only({<[FROM]={'*MARIAM*'},[EMPSTATUS]={'Current'},[TO]={"$(vPlaces)"}>} EMP_RELIEVE_DATE)))

Anil_Babu_Samineni

Instead, Can i ask sample application to work it out as per needs?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
saivina2920
Creator
Creator
Author

pls. find the test qlikview file attachment.

enter some input or let it be blank in user input.

then check the TABLE-1...(want to exclude future date or all zero value in the row  (1-10.10-30,>30)

Anil_Babu_Samineni

Perhaps this?

Table.png

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
saivina2920
Creator
Creator
Author

Yeah. one part is correct. the other part "enter number" in input, then nothing will come.

When i enter input (say 5 days, nothing will come). ?????

Input Count is wrong-03JAN2021-1.PNG

Anil_Babu_Samineni

PFA Updated

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
saivina2920
Creator
Creator
Author

count is not coming perfect in both cases. also future date is coming along with zero again....?

pls. check your last attachment.(Count based on today-03JAN2021-1_v0.1.qvw).

Anil_Babu_Samineni

Check the latest one and confirm? If still not, Kindly share more information?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful