Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count of Date

Hi ,

I need to count number of date between first day of year up today and like this for previous year.

I don't know what to do

please help me;

With Best Regards

Hamide

9 Replies
Not applicable
Author

Hi Hamide,

I hope this will help you out.

This year start date to today:

=num(Today())-num(YearStart(Today()))

Last year start date to today:

=num(Today())-num(YearStart(Today()))+365

eromiyasimon
Creator II
Creator II

to calculate today from this year start use below query

=Today()-YearStart(Today())


to calculate today from this previous year start use below query and the minus values goes on for every previous year

=Today()-YearStart(Today(),-1)

hope this helps

Anil_Babu_Samineni

Can you elaborate more

Do you mean Starting Date to Ending Date of the PY

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
engishfaque
Specialist III
Specialist III

Hi Hamide,

Here it is,

=Today() - YourDateField

OR

=YourEndDate - YourStartDate

Kind regards,

Ishfaque Ahmed

ecolomer
Master II
Master II

Days between today and first day of year:

=Today() - yearStart(today())

From Previous year to first day of year:

= yearStart(today()) - AddYears(Today(),-1)

jonathandienst
Partner - Champion III
Partner - Champion III

Counting off same number of days in previous year

=YearStart(Today(), -1) + (Today() - YearStart(Today()))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi,

Thanks for  your answer, but my date is shamsi date

I want calculate the number of date between 1/1/1395 up today(12/8/1395) ;

My answer should be : 228

Regards

Anil_Babu_Samineni

Try Some thing Like this and then we can help you OR Please provide me sample Data which demonstrates the o/p

Count(Date(Interval(1/1/1395 - 12/8/1395),'DD/MM/YYYY'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful