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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
qliksus
Specialist II
Specialist II

Regarding aggr function

Hi,

I have a excel file from which contain budegt of the year. Here i want to calculate the latest budget yearwise. means i have a Type dimension which contains value 1,2,3,4 respectively. Means 1 is first fuxed budget, 2 is the second budget and like this. Suppose for a period for all this type amount is present means i have to take amount type 4 because this is the latest budget fixed. I am able to get latest budget in a pivot chart by taking period as a dimension but yearwise i can't able to get the whle sum value. because i wanto use the whole sum amount yearwise in gauge Chart.

My excel data is

TypeYearPERIODAmount
12009012,139
12009021,822
12009031,753
12009041,973
12009051,966
12009061,937
12009072,108
12009081,937
12009091,880
12009101,920
12009111,930
12009122,101
22009012,092
22009021,753
22009032,010
22009041,923
22009052,369
22009061,892
22009071,947
22009081,872
22009091,880
22009101,879
22009111,892
22009121,917
3200972,055
3200982,110
3200992,165
32009102,220
32009112,275
32009122,330
42009102,350
42009112,380
42009122,400
1201012100
1201022,200
1201032300
1201042,400
1201052500
1201062,600
2201042200
2201052,250
2201062300


Now i am able to see correct output while taking the dimensions like period and year in a pivot chart and output is

TypeYearPERIODAmount
22009012,092
22009021,753
22009032,010
22009041,923
22009052,369
22009061,892
3200972,055
3200982,110
3200992,165
42009102,350
42009112,380
42009122,400
1201012100
1201022,200
1201032300
2201042200
2201052,250
2201062300


but i want the output like

YearAmount
200925499
201013350


so that i can get amount in text object also. I know this can be done by using aagr function. But unfortunately i tried but still unable to get the output.

can anyone help me?????????

3 Replies
Not applicable

Hi,

I hope the attached example helps.

Good luck!

Rainer

qliksus
Specialist II
Specialist II
Author

Hi,

Thanks for ur reply. But unfornately this is not my requirement. In your file ur data is like for a one period there is only one Type. Actually scenario is little bit different like for a period there should many type no i.e period(1) contains Type(1,2,3 etc ). At that time u have calculate the amount of the maximum Type Year wise.

Not applicable

Hi,

than you have tomofify your Group By Statement in a way like this:

AggregatedBudget:
Load
Type as AggrType,
Year,
Sum(Amount) as AmountByYear
Resident Budget
Group By Year, Type
;



Hope it helps.

Rainer

Hope it helps.

Rainer