Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

harveenkaur
New Contributor II

Growth Calculation with hierarchy

I want growth for the city sales data and along with growth for the district and state sales to which city belongs. The data must be presented in the format given below in the table.(QVF is also attached along).

Growth Formula=(CurrentYearSales-LastYearSales)/LastYearSales.

CityCity Sales GrowthDistrict Sales GrowthState Sales Growth
C1x%x%x%
C2x%x%x%
C3x%x%x%
C4x%x%x%
3 Replies

Re: Growth Calculation with hierarchy

Like this?

image.png

Expressions

Sum(CurrentYearSales)/Sum(LastYearSales) - 1

Aggr(NODISTINCT Sum(CurrentYearSales), District)/Aggr(NODISTINCT Sum(LastYearSales), District) - 1

Aggr(NODISTINCT Sum(CurrentYearSales), State)/Aggr(NODISTINCT Sum(LastYearSales), State) - 1
harveenkaur
New Contributor II

Re: Growth Calculation with hierarchy

Yes, it worked. Thank you.

Re: Growth Calculation with hierarchy

Awesome