Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III

Count No. of Days in a month - problem?

Correct Answer   Re: Count number of Days of a Month

to get the count of Mondays for example you can simply use count({<[Day Name Field] = {'Monday'}>}  [Day Name Field]) you can do the same for the rest of the days.

Hi I looked at the answer above, but I am having trouble applying this:

I then make the table thus: I don't know what is happening!

=Monthname(AdmDate)count(if(WeekDay(AdmDate) = 'Sat', 1))count({<[DayAdmDate] = {'Mon'}>} [AdmDate])
Jul 20173990
Aug 20171955

is the problem the week day and then the month????

Jo

MonthAdm=date(AdmDate, 'www dd/MM/yyyy')num(WeekDay(AdmDate) +1 )(WeekDay(AdmDate) )
Jul 2017Sat 01/07/20176Sat
Sun 02/07/20177Sun
Mon 03/07/20171Mon
Tue 04/07/20172Tue
Wed 05/07/20173Wed
Thu 06/07/20174Thu
Fri 07/07/20175Fri
Sat 08/07/20176Sat
Sun 09/07/20177Sun
Mon 10/07/20171Mon
Tue 11/07/20172Tue
Wed 12/07/20173Wed
Thu 13/07/20174Thu
Fri 14/07/20175Fri
Sat 15/07/20176Sat
Sun 16/07/20177Sun
Mon 17/07/20171Mon
Tue 18/07/20172Tue
Wed 19/07/20173Wed
Thu 20/07/20174Thu
Fri 21/07/20175Fri
Sat 22/07/20176Sat
Sun 23/07/20177Sun
Mon 24/07/20171Mon
Tue 25/07/20172Tue
Wed 26/07/20173Wed
Thu 27/07/20174Thu
Fri 28/07/20175Fri
Sat 29/07/20176Sat
Sun 30/07/20177Sun
Mon 31/07/20171Mon
Aug 2017Tue 01/08/20172Tue
Wed 02/08/20173Wed
Thu 03/08/20174Thu
Fri 04/08/20175Fri
Sat 05/08/20176Sat
Sun 06/08/20177Sun
Mon 07/08/20171Mon
Tue 08/08/20172Tue
Wed 09/08/20173Wed
Thu 10/08/20174Thu
Fri 11/08/20175Fri
Sat 12/08/20176Sat
Sun 13/08/20177Sun
Mon 14/08/20171Mon
Tue 15/08/20172Tue
Wed 16/08/20173Wed
Thu 17/08/20174Thu
Fri 18/08/20175Fri
Sat 19/08/20176Sat
Sun 20/08/20177Sun
Mon 21/08/20171Mon
Tue 22/08/20172Tue
Wed 23/08/20173Wed
Thu 24/08/20174Thu
Fri 25/08/20175Fri
Sat 26/08/20176Sat
Sun 27/08/20177Sun
Mon 28/08/20171Mon
Tue 29/08/20172Tue
Wed 30/08/20173Wed
1 Reply
Creator III
Creator III

aha - so now I have refined the problem:

I need to do a distinct AdmDate ....

  

AdmDateAdmDay
25/08/2017 12:00:00 AMFri
25/08/2017 12:00:00 AMFri
25/08/2017 12:00:00 AMFri
18/08/2017 12:00:00 AMFri
18/08/2017 12:00:00 AMFri
18/08/2017 12:00:00 AMFri
11/08/2017 12:00:00 AMFri
11/08/2017 12:00:00 AMFri
11/08/2017 12:00:00 AMFri
11/08/2017 12:00:00 AMFri
4/08/2017 12:00:00 AMFri
4/08/2017 12:00:00 AMFri
4/08/2017 12:00:00 AMFri
4/08/2017 12:00:00 AMFri

success:

count({<[DayAdmDate] = {'Mon'}>}  distinct([AdmDate]))

Jo