# Qlik Sense Integration, Extensions, & APIs

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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!

Tags (4)
1 Solution

Accepted Solutions
MVP

## 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
Contributor

## Re: Calculating client growth per month

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

MVP

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

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

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

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

MVP

## Re: Calculating client growth per month

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

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

Contributor

## Re: Calculating client growth per month

Now I only get a single month

MVP

## 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?

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!

MVP

## Re: Calculating client growth per month

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

Community Browser