Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
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
MVP
MVP

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
MVP
MVP

Awesome