Show the growth rate over the previous month


#1

Hello, i have a KPI that show the amount of sales of a company, for that i use a static filter with the company value, but i need to show what is the growth rate compared to the previous month, is there a way to do that? maybe with other kpi and applying a static filter?


#2

Actually you can do it, you have to define two metrics one for the amount of sales wich is going to be the base metric and a comparative metric, you can review the complete example in the documentation(Growth Rate), this is an example of a comparative metric:

const rate = cf.CompareMetric('your_sales', 'sum')
                .rate('growth')
                .with('-1 month')
                .using('your_time_field')
                .label('Growth rate previous period');

#3

Got it, actually I use your example and put it as the second metric a it works good, I just need to change the styles and colors, i will check the documentation for that, it seems like is very good explained.

Thanks.