Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
perhaps if you create what your looking for in excel and post on here we can guide you better to an outcome.
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
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
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
Year | Customer | Amount |
2014 | 10000 | 10132 |
2014 | 20000 | 8773,8 |
2014 | 30000 | 1891 |
2014 | 50000 | 76907,4 |
2014 | 40000 | 49321 |
2014 | 60000 | 11334 |
2014 | 61000 | 1637 |
2014 | 62000 | 5155 |
2015 | 10000 | 267842,85 |
2015 | 20000 | 268709,05 |
2015 | 30000 | 174009,95 |
2015 | 50000 | 100122,6 |
2015 | 42147258 | 70392,15 |
2015 | 43687129 | 3744,34 |
2015 | 32656565 | 4297,24 |
2015 | 49633663 | 421,71 |
2015 | 46897889 | 9433,38 |
2015 | 1445544 | 2781,92 |
2015 | 47563218 | 139509,13 |
2015 | 35963852 | 241342,9 |
2015 | 35451236 | 109665,42 |
2015 | 40000 | 112469 |
2015 | 45282829 | 1251,95 |
2015 | 42369147 | 116,6 |
2015 | 60000 | 139990 |
2015 | 61000 | 240280 |
2015 | 62000 | 131562 |
2016 | 10000 | 132193 |
2016 | 20000 | 231286,6 |
2016 | 30000 | 36759,55 |
2016 | 50000 | 187546,7 |
2016 | 40000 | 96617 |
2016 | 60000 | 59460 |
2016 | 61000 | 99019 |
2016 | 62000 | 101950 |