Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
saivina2920
Creator
Creator

Date count not coming properly for past 10 days and 10 to 20 days from today

EMP_RELIEVE_DATE
--------------------------
13/07/2020
24/07/2020
07/08/2020

08/12/2020

i used one more option which is 10 to 30 days and <10 days. below is the statement. pls. confirm whether below statement is correct or not for 10 to 30 days.

=count(DISTINCT if((Date(EMP_RELIEVE_DATE,'DD/MM/YYYY') - Today() <= -10 and Date(EMP_RELIEVE_DATE,'DD/MM/YYYY') - Today() >= -20)),EMP_RELIEVE_DATE))

for less than (<10 days)

=count(DISTINCT if((Date(EMP_RELIEVE_DATE,'DD/MM/YYYY') - Today() > -10 and Date(EMP_RELIEVE_DATE,'DD/MM/YYYY') - Today() < 0) ),EMP_RELIEVE_DATE))

 

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

18 Replies
Kushal_Chawda

@saivina2920  may be try below

= Count({<EMP_RELIEVE_DATE={"=today()-EMP_RELIEVE_DATE<10"}>}EMP_RELIEVE_DATE)

 

= Count({<EMP_RELIEVE_DATE={"=today()-EMP_RELIEVE_DATE>=10 and today()-EMP_RELIEVE_DATE <=30"}>}EMP_RELIEVE_DATE)

saivina2920
Creator
Creator
Author

Thanks for your reply.

= Count({<EMP_RELIEVE_DATE={"=today()-EMP_RELIEVE_DATE<10"}>}EMP_RELIEVE_DATE)

The above working for past days. But, the count should come for the future date from today.

the above expression has come for future date also. but, it should not come.

for example,

if EMP_RELIEVE_DATE = "28/12/2020" ==> then it should not come. because it is future date.

The query should consider only past date from today is mandate.

???

Kushal_Chawda

@saivina2920  Your statements are contradicting. 

"The above working for past days. But, the count should come for the future date from today" then you are saying

"if EMP_RELIEVE_DATE = "28/12/2020" ==> then it should not come. because it is future date."

Can you please elaborate with example?

 

saivina2920
Creator
Creator
Author

Excel Data-1.PNG

pls. refer the above real data. i want the count like above.

But, the current expression, shows future date also.

sample Qlik File Attached.

 

saivina2920
Creator
Creator
Author

can anyone check the file and give us the correct count..this is urgent and i am waiting..

Kushal_Chawda

@saivina2920  see the attached. Make sure that your Date field is in proper Date format.

saivina2920
Creator
Creator
Author

Thanks for your reply..

Attached sample is coming perfect.

the same query i used, it is something different. Where do i check the date format.

i used 

LOAD  Date(Floor(EMP_RELIEVE_DATE]), 'DD/MM/YYYY') as EMP_RELIEVE_DATE;

Is there any other place to check the date format like today date...?

Kushal_Chawda

@saivina2920  If you are able to get the value using max(EMP_RELIEVE_DATE) in text object that means it is in proper date format.

try to apply Date function in set analysis

 

saivina2920
Creator
Creator
Author

i changed like above.

some dates are coming like, "01/01/0001" and some "-" character.

Because of the unformated character and date,  May i not able to get the correct count...?

still facing the problem...