Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

getting counts from certain start date to certain end date

i am getting counts by applying below conditions

count({$<log_type_id={'23'}>} user_activity_log_id)

Now i want to get counts for particular date range(i.e from certain start date to certain end date).

and this selection of start date and end date has to be selected from UI manually.

I used select Date ui but it shows count for particular date selected.But i want to get counts for particular date range.

How could i do that.Please help me.

Tags (2)
3 Replies
lironbaram
Honored Contributor II

Re: getting counts from certain start date to certain end date

hi

if the user selects a range of dates then your counts will be calculated to the selected date range

galax_allu
Valued Contributor

Re: getting counts from certain start date to certain end date

Hi


provided


Salesdate is your    DATE field range


vfromdate is  your from date


Vtodate is your to date 



count({$<SalesDate={'>=$(=Date(vFromDate, 'YYYY-MM-DD'))<=$(=Date(vToDate, 'YYYY-MM-DD'))'}>},{$<log_type_id={'23'}>} user_activity_log_id)


or


working with particular dates


Sum({<SalesDate={'>=2013-02-05<=2013-05-18'}>},{$<log_type_id={'23'}>} user_activity_log_id)





ahammadshafi
Contributor

Re: getting counts from certain start date to certain end date

Hi:

Please try something like -

Count({<Date={">=$(=Date($StartDate)) <=$(=Date($EndDate))"}>}user_activity_log_id)

Ahammad Shafi

Community Browser