Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting Days

When I select a Week in my document, the number of days in that week are highlighted only  if there is data for those days.  For example, a week has seven days but if my selection only contains data for 6 days, the count is 6.  I want to be able to count the number of calendar days in a selection, regardless of presence of data.  So, if I select a month I want to count 30, 31, or 28 days.  Even if there are days missing data.

Can I do that?

Brian Summ

1 Solution

Accepted Solutions
Not applicable
Author

Haven’t tried it yet. Thanks though.

View solution in original post

5 Replies
sebastiandperei
Specialist
Specialist

Hi Brian.

It depends on the schema you have created. Do you have a Calendar Table?

If you have it, you could count (distinct Date_Field)

If you don't have it, try with

max(Date_Field)-min(Date_Field)

Date_Field must be in date format, not timestamp.

Not applicable
Author

Hi Sebastian,

Thanks for the help. I have tried the count function. Trouble is it only counts selected days if there is data. I want to count all selected days, regardless of presence of data.

Regards,

Brian

prodanov
Partner - Creator
Partner - Creator

You must create a Calendar table and use Set analysis at MIn and Max function. Like that: max({1<week=,week={$(#=only(week))}>} date)

sebastiandperei
Specialist
Specialist

Did you have tried the second suggest i sent?

Please, read all!

max(Date_Field)-min(Date_Field)

Not applicable
Author

Haven’t tried it yet. Thanks though.