
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count no of days in a month
Hi,
How to count no of days in a month?
I have a field Posting date and need to count no of days in a month based on posting date.
In current month, I need to have the count only till current day. For ex: Today is Sept 25, so it must be only 25 in case of posting date is in this month range.
I need to achieve this in load statement to sum the value of fields.
Thank you.
- Tags:
- qlikview_scripting
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@KuppuswamyS try below
if([Posting Date] >=monthstart(today()),day(Today()), NoOfDaysExpression)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@KuppuswamyS you can use for example Interval, like :
=Interval(Date2-Date1 ,'D')
example :
Interval is a script and chart function, so you can use it in Load !
Taoufiq ZARRA
"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
(you can mark up to 3 "solutions") 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@KuppuswamyS If any dates is missing in your Data then do you still need to count it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Taoufiq and Kush,
I managed to get no of days in a month using expressions in pivot table.
I have posting date field and it has data. If posting date is in current month, I need to get only no of days(as of today) in this month. Can you please help me to get that logic.
Example : If posting date field data is Aug 2020, it is 31 days but if Sept 2020(Current month), today is 25th Sept, (as of today, no of days must be 25).
Thank you.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@KuppuswamyS can you share a sample data and the expected output ?
Taoufiq ZARRA
"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
(you can mark up to 3 "solutions") 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@KuppuswamyS try below
if([Posting Date] >=monthstart(today()),day(Today()), NoOfDaysExpression)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works, Thank you Kush.
