Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggregation stacked chart with two dimensions

Hi. I need to create calculated measure so that it is shown on stacked bar chart with two dimension (Year and Customer), but aggregated...

So far I have this measure:

sum({$<Customer=,Year=>}Aggr(Sum(Amount),Customer,Year))

what gives me that:

Numbers are ok, customers are ok on legend, but it not aggregated by years at all.

Hope you get my problem and I hope that there is someone who has idea for this problem.

4 Replies
ogster1974
Partner - Master II
Partner - Master II

perhaps if you create what your looking for in excel and post on here we can guide you better to an outcome.

Michael_Tarallo
Employee
Employee

Hi Kamil,

In addition to Andy's request for more information, I would suggest you create a table object with the data in it as well, so you can see the numbers that are being used in the chart. That way you will have a better understanding of the calculation and to see if it is accurate.

I am not sure what you mean by "but it not aggregated by years at all."

The chart is showing years across the bottom - so the amount is being aggregated by customer, for each year.

I am not sure if the aggr() function is giving you what you expect. Let me conduct some research and get back to you.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

In the mean-time as a I research, see if this community post helps:

Aggr() - this post explains a bit and provides some links out to other resources.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
Anonymous
Not applicable
Author

Thank for your interest.

By aggregating by years i mean values should be summing up:

2013:                               5,03M

2014=2014+2013:           6,81M

2015=2015+2014+2013: 7,9M

I guess I need to use functions rangesum and above, but i dont know how. Data below

 

YearCustomerAmount
20141000010132
2014200008773,8
2014300001891
20145000076907,4
20144000049321
20146000011334
2014610001637
2014620005155
201510000267842,85
201520000268709,05
201530000174009,95
201550000100122,6
20154214725870392,15
2015436871293744,34
2015326565654297,24
201549633663421,71
2015468978899433,38
201514455442781,92
201547563218139509,13
201535963852241342,9
201535451236109665,42
201540000112469
2015452828291251,95
201542369147116,6
201560000139990
201561000240280
201562000131562
201610000132193
201620000231286,6
20163000036759,55
201650000187546,7
20164000096617
20166000059460
20166100099019
201662000101950