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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniele3
Contributor
Contributor

Aggregation data in Pivot table

Hello everyone, I am new to programming with Qlik and I need help with a request that was made to me.

I have a pivot table with data written in a format similar to this:

GROUP | VALUE

210           1000
220           2000
230           3000
310           1000
320           2000

I would like to aggregate the values ​​in the format:

GROUP | VALUE

200          6000
300          3000

And, expanding the data, clicking on the "+", then see the subdivisions in the following way:

GROUP | VALUE

200           6000
- 210        1000
- 220         2000
- 230         3000
300           3000
- 310         1000
- 320         2000

Can anyone suggest a method to do this?
Thanks in advance

Labels (1)
1 Reply
QFabian
MVP
MVP

Hi @Daniele3 , here an option, creating the additional field in script :

 

Data:
Load //precedent load
     *,
    floor(GROUP / 100) * 100 as Level_1;
Load * INLINE [ //your data
GROUP, VALUE
210, 1000
220, 2000
230, 3000
310, 1000
320, 2000
];
QFabian_0-1726602809328.png

 

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.