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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
kateperry
Partner - Contributor II
Partner - Contributor II

Rollup of data into different levels

Hello all

I have been playing about with performing rollups of data, and I seem to have ended up way more complex than I think I need to! I would appreciate any help/suggestions anyone can offer.

I have data with 1st field that specifies the level

LevelDescriptionAmount
1Main Rollup 1£100
2Secondary Rollup 1£50
3Tertiary Rollup 1£20
3Tertiary Rollup 2£15
2Secondary Rollup 2£3


I want the user to be able to select which level to view the data. A high level (low number) should roll up all later amounts, with the desc

e.g. view level 1 should give:

Main Rollup 1 £188

e.g. view level 2 should give:

Main Rollup 1£100
Secondary Rollup 1£85
Secondary Rollup 2£3


e.g. view level 3 should give:

Main Rollup 1£100
Secondary Rollup 1£50
Tertiary Rollup 1£20
Tertiary Rollup 2£15
Secondary Rollup 2£3


I want to be able to select the level to view (either list box or drill down/cyclic dimension) but also have the various levels in a pivot table, with totals at each level.

I am assuming I need to have the different levels as different columns:

LevelDescriptionLevel 1Level 2Level 3
1Main RollupMain Rollup 1Main Rollup 1Main Rollup 1
2Secondary RollupMain Rollup 1Secondary Rollup 1Secondary Rollup 1
3Tertiary RollupMain Rollup 1Secondary Rollup 1Tertiary Rollup 1
3Tertiary RollupMain Rollup 1Secondary Rollup 1Tertiary Rollup 2
2Secondary RollupMain Rollup 1Secondary Rollup 2Secondary Rollup 2


I have been chasing my tail a bit with this one, so I would appreciate any help anyone can offer.

Many thanks in anticipation...

2 Replies
prasad
Contributor III
Contributor III

Hi,

LevelDescriptionAmount
1Main Rollup 1£100
2Secondary Rollup 1£50
3Tertiary Rollup 1£20
3Tertiary Rollup 2£15
2Secondary Rollup 2£3

To get sum of Amount for level 1, with description, open new sheet and choose chart, add level in dimension and in expression, insert sum(Amount).

and finish. Then when you select the level 1 you will definetly get the sum of Amount. Please try this.

Prasad

kateperry
Partner - Contributor II
Partner - Contributor II
Author

Hi Prasad

Many thanks for your response.

That will give me a total of each level, however I want to be able to drill down, i.e. have a pivot table where I get totals of level1, but then I can expand that level and get the relevant totals at level2, then level3 etc...

Thanks again