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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
lmonincx
Creator II
Creator II

How to count customers on first of the month level based on start en end date

Hi,

Iam looking for a way to display a barchart with the dimension yearmonth ( i.e. 201201) for ceveral years and then display the number of customers at the first day of that month active ( startdate is <= displayed yearmonth and enddate >displayed yearmonth)

my data is like:

customernr, startdate, enddate

Can this be done with a formula in the chart or do i need to build per yearmonth a dataset in the load?

kind regards and thanks for helping me out.

Linda Monincx

1 Reply
mightyqlikers
Creator III
Creator III

Hi Linda,

create two fileds irrespective of data model with min date and max date.

then name them as from date and todate

and generate recno for those two date fields.

then use fromdate list box and for todate list box write the below expression

     if(fromrno<=torno,todate)

write accordingly in the ex[pression.

Regards

Samwise