Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
saivina2920
Creator
Creator

How to exclude future dates in the expressions

I have the list of values in the below screenshot.

But, i want to exclude future dates in the expressions. or if all values are zero's (1-10,10-30,>30days) then we can remove this row.

If future exist date's in the table expressions, then there is no count in the table. (all becomes zero. so there is no need to display)

I want to exclude future dates to display in the table.

How to do this..?

Junk Values an Future Date-31DEC2020-2.png

Emp reg date (Calculated dim):

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

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)
3 Replies
Anil_Babu_Samineni

I assume this is the field as per image "EMP_RELIEVE_DATE" If so, Try using as per below ways whereever "EMP_RELIEVE_DATE"

1) EMP_RELIEVE_DATE <= Date(Today())

2) Only({<EMP_RELIEVE_DATE-={"=EMP_RELIEVE_DATE>=Date(Today())"}>} 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

yes. EMP_RELIEVE_DATE is field

But, i don't understand where i will apply. Also, i used duration (1-10,10-30.>30 days). If i change anything as mentiond you. can you confirm will it work..

below is my dimension and expression.

Emp reg date (Calculated dim)

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

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.

 

1) EMP_RELIEVE_DATE <= Date(Today()) ==> shall i use in dim/exp...?

2) Only({<EMP_RELIEVE_DATE-={"=EMP_RELIEVE_DATE>=Date(Today())"}>} EMP_RELIEVE_DATE) ==> shall i use in the exp1 and exp2

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