Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
maxim1500
Partner - Creator
Partner - Creator

Calculating client growth per month

Hi,

I am trying to calculate the client growth rate per month. I was able to get the period growth rate (for example, trailing 12 months):

(Count({<$(=vMaxDate)>} distinct [Client ID]) - Count({<$(=vPeriodLowerBand)>} distinct [Client ID]))/Count({<$(=vPeriodLowerBand)>} distinct [Client ID])

with vMaxDate = current date, vPeriodLowerBand = current date - 12 months

But I need to create a bar chart with monthly rates. The x axis would be months for the past year, and the y axis the monthly growth rate.

In other words, I would need to "aggregate" the rates by month instead of calculating for the whole period.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

What all dimensions do you have? I think you need this month divided by last 12 months? You would need to use Above()/Below() functions to do this. Would you be able to provide a sample to play around with?

View solution in original post

8 Replies
maxim1500
Partner - Creator
Partner - Creator
Author

A little precision: the dataset contains monthly data. Don't need to group the dates by months...

sunny_talwar

May be this:

(Count({<$(=vMaxDate)>} distinct [Client ID]) - Count(TOTAL <MonthField>{<$(=vPeriodLowerBand)>} distinct [Client ID]))/Count(TOTAL <MonthField>{<$(=vPeriodLowerBand)>} distinct [Client ID])

maxim1500
Partner - Creator
Partner - Creator
Author

Hi Sunny,

Thanks for your help! I tried your suggestion, and it doesn't appear to solve my issue. Here is what I get

months.png

(Count({<$(=vMaxDate)>} distinct [Client ID]) - Count( TOTAL <[Snapshot Date]> {<$(=vPeriodLowerBand)>} distinct [Client ID]))

/ Count( TOTAL <[Snapshot Date]> {<$(=vPeriodLowerBand)>} distinct [Client ID])

sunny_talwar

How about this?

(Count({<$(=vMaxDate)>} distinct [Client ID]) - Count( TOTAL {<$(=vPeriodLowerBand)>} distinct [Client ID]))

/ Count( TOTAL {<$(=vPeriodLowerBand)>} distinct [Client ID])

maxim1500
Partner - Creator
Partner - Creator
Author

Now I only get a single month

months.png

sunny_talwar

What all dimensions do you have? I think you need this month divided by last 12 months? You would need to use Above()/Below() functions to do this. Would you be able to provide a sample to play around with?

maxim1500
Partner - Creator
Partner - Creator
Author

I didn't know I could use above/below in expressions. That's exactly what I was looking for! Thanks!

sunny_talwar

That is awesome. I am glad I was able to point you in the right direction