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

Customer count by month

Hi,

I'm trying to create a bar chart showing the number of active customers for the current month and 6 months back. Customers have a StartDate and a EndDate. How to configure the date range as a dimension is what I'm struggling with. Any pointers or hints would be much appreciated!

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

I belive I got it working with help from this post: http://www.qlikcommunity.com/thread/56715

Added this in my load script:

AddMonths(MonthStart(StartDate),iterno()-1) as ContractMonth

While MonthStart(EndDate) >= AddMonths(MonthStart(StartDate),iterno()-1);

Added a car chart with ContractMonth as dimension and the following expression:

Count({<Company = {'24'}, Status = {A}>} CustomerNo)

The active contracts are listed sorted by month as per 1st of the given month, however some contracts have fictitious dates set to a year we will all be gone. So one of the month groups displayed is for active contract in the year 2099.

I got help on how to filter this in this thread: http://community.qlik.com/message/272886#272886

Message was edited by: tfolgero

View solution in original post

2 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

So you have Date as a field as well as StartDate and EndDate?

Not applicable
Author

I belive I got it working with help from this post: http://www.qlikcommunity.com/thread/56715

Added this in my load script:

AddMonths(MonthStart(StartDate),iterno()-1) as ContractMonth

While MonthStart(EndDate) >= AddMonths(MonthStart(StartDate),iterno()-1);

Added a car chart with ContractMonth as dimension and the following expression:

Count({<Company = {'24'}, Status = {A}>} CustomerNo)

The active contracts are listed sorted by month as per 1st of the given month, however some contracts have fictitious dates set to a year we will all be gone. So one of the month groups displayed is for active contract in the year 2099.

I got help on how to filter this in this thread: http://community.qlik.com/message/272886#272886

Message was edited by: tfolgero