Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count of Day, Between two dates

Hi,

Could please send me the expression for count of day between two different dates.

Suppose, I have selected Start Date as 1-Jan-2014 and End Date as 11-Jan-2014. and there is another column, which have day information. I need count of particular day falling between this period.

So suppose, if the day is monday,  the  count will be 1 and if it is Thursday, the count will be 2.

4 Replies
MK_QSL
MVP
MVP

Unclear from your question... can you please elaborate with one more good example?

erivera10
Creator
Creator

The question is not clear, but what is meant is that you need to count the days between a date range. You can take this time directly from the table of Date_example field as I did in my example or you can delimit it with the "create calendar / slider object", which is found in the design of Qlikview, Rear mind to apply the code in the "Object text" annexed qvw and excel.

Captura de pantalla 2014-07-03 17.56.14.png

Not applicable
Author

Example:

Start Date : 1-Jan-2014

End Date: 11-Jan-2014

So between the start and end date, MONDAY falls one time. So I am looking for an expression which give count MONDAY between start and end date.

I am maintaining one column, which has list of all days, So if the input will be monday, the output from the expression will be 1. Similarly, Friday falls two times between start and end date, so the output will be 2.

Please let me know, if any problem while understanding the above example. so that i will try to give some other good example.

Thanks

erivera10
Creator
Creator

I think I get it, you need to have specific days between the start date and end date. For this you need to apply the "where" command in the "script" or a condition in typical expression, count (date_example = 'Mon'), something may work, it is a matter for you to try and search examples. Question to explore is, that it left me a lot of knowledge.