Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'd like to aggregate the data while loading it from the Source.
Let me give you an example.
This is my data. There are fields 'year' and 'month'. But actually I don't need split by month in my dashboard. So I'd like to aggregate the data by year and make the whole dataset smaller. Is it possible on the backfront in QlikView? !
Brands | Year | Month | Cost |
Brand1 | 2013 | Jan | 10 |
Brand2 | 2013 | Feb | 15 |
Brand1 | 2013 | Mar | 20 |
Brand1 | 2013 | Apr | 30 |
Brand2 | 2013 | May | 10 |
Brand1 | 2014 | Jan | 5 |
Brand2 | 2014 | Feb | 15 |
Brand1 | 2014 | Mar | 20 |
Brand2 | 2014 | Apr | 30 |
Brand1 | 2014 | May | 10 |
Thank you in advance,
Larisa
Is this what you are envisioning?
Script:
Table:
LOAD Brands,
Year,
Month,
Cost
FROM
[https://community.qlik.com/thread/164550]
(html, codepage is 1252, embedded labels, table is @1);
Table1:
LOAD Brands,
Year,
Sum(Cost) as Cost
Resident Table
Group By Year, Brands;
DROP Table Table;
If yes then PFA..
Best,
Sunny
Is this what you are envisioning?
Script:
Table:
LOAD Brands,
Year,
Month,
Cost
FROM
[https://community.qlik.com/thread/164550]
(html, codepage is 1252, embedded labels, table is @1);
Table1:
LOAD Brands,
Year,
Sum(Cost) as Cost
Resident Table
Group By Year, Brands;
DROP Table Table;
If yes then PFA..
Best,
Sunny
Or just don't load the Month data.
Andy
The Group By clause is what you need to do something like this on the script.
If you need something similar on the front end, you'll have to use the aggr() function.
example:
aggr(sum(Cost), Year) or aggr(sum(Cost), Year, Brands) depending on what you want to show.
Agis
Thanks everyone for your comments!