Discussion board where members can get started with QlikView.
I have data with three columns. State, City, Sales.
I wish to show State, and sum so sales for top 2 city in that state.
State City Sales
Karnataka Bangalore 50
Karnataka Mangalore 40
Karnataka Hubli 30
Uttar Pradesh Lucknow 45
Uttar Pradesh Kanpur 35
Uttar Pradesh Unnao 25
Uttar Pradesh 80
What expression or dimension shall I use?
Sum(If((Aggr(Rank(Sum(Sales)), State, City))<3, Sales))