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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Number of days in a Quarter

How to find number of days in a Quarter using expression in charts. I have calculated quarter in the load statement.

5 Replies
rubenmarin

Hi Vasu, If you have a Quarter selected and you have dates related to that quarter, you can use:

=Floor(QuarterEnd(Min(DateField)))-QuarterStart(Min(DateField))+1

Anonymous
Not applicable
Author

ive first day of next quarter and first day of current quarter

daynumberofyear(dateofyournextquarterstart)-daynumberofyear(dateofyourquarterstart)

Kushal_Chawda

If you have quarter calculated. Select Year, then select quarter and count the dates for respective quarters

Expression:

count( distinct Date)

rubenmarin

Be aware that DayNumberOfYear() always count 366-days years, so 01/04/YYYY will be always the 92nd day of the year, doesn't matters if february had 28 or 29 days.

For this I prefer to not use that function and use the difference between dates.

MarcoWedel

Hi,

one solution could be also:

DayNumberOfQuarter(QuarterEnd(YourDateField))

QlikCommunity_Thread_176066_Pic2.JPG

QlikCommunity_Thread_176066_Pic1.JPG

Note: DayNumberOfQuarter always uses 366days per year regardless of leap-years or not.

hope this helps

regards

Marco