Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
maxim1500
Contributor

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

Re: Calculating client growth per month

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?

8 Replies
maxim1500
Contributor

Re: Calculating client growth per month

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

Re: Calculating client growth per month

May be this:

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

maxim1500
Contributor

Re: Calculating client growth per month

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])

Re: Calculating client growth per month

How about this?

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

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

maxim1500
Contributor

Re: Calculating client growth per month

Now I only get a single month

months.png

Re: Calculating client growth per month

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
Contributor

Re: Calculating client growth per month

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

Re: Calculating client growth per month

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