Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
harveenkaur
Contributor III
Contributor III

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
sunny_talwar

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
Contributor III
Contributor III
Author

Yes, it worked. Thank you.
sunny_talwar

Awesome