Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ArMehr
Contributor II
Contributor II

Customize qlikview partial sum

Hi.

I have a pivot table like this:

1.JPG

 

I want to show partial sum like this:

2.JPG

 I would be very glad you could help me.

Mehr
Labels (2)
1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

Script:

1:
LOAD * INLINE [
    Customer, Client, Year, Qty
    Joe, Sweden, 2018, 10
    Joe, Norway, 2018, 5
    Joe, Sweden, 2019, 20
    Joe, Norway, 2019, 10
    John, Sweden, 2018, 5
    John, Norway, 2018, 10
    John, Sweden, 2019, 10
    John, Norway, 2019, 20    
    Sarah, Sweden, 2018, 30
    Sarah, Norway, 2018, 20
    Sarah, Sweden, 2019, 40
    Sarah, Norway, 2019, 60
    
];

Island:
Load * Inline [
	Dim
	1
	2
];

 

Pivot:

Dimensions:

 

=Pick(Dim,Client,'Total')

=Year

=Customer

 

Expression:

sum(Qty)

 

and only enable "Show Partial Sums" for Customer

Unbenannt.png

View solution in original post

3 Replies
Frank_Hartmann
Master II
Master II

Script:

1:
LOAD * INLINE [
    Customer, Client, Year, Qty
    Joe, Sweden, 2018, 10
    Joe, Norway, 2018, 5
    Joe, Sweden, 2019, 20
    Joe, Norway, 2019, 10
    John, Sweden, 2018, 5
    John, Norway, 2018, 10
    John, Sweden, 2019, 10
    John, Norway, 2019, 20    
    Sarah, Sweden, 2018, 30
    Sarah, Norway, 2018, 20
    Sarah, Sweden, 2019, 40
    Sarah, Norway, 2019, 60
    
];

Island:
Load * Inline [
	Dim
	1
	2
];

 

Pivot:

Dimensions:

 

=Pick(Dim,Client,'Total')

=Year

=Customer

 

Expression:

sum(Qty)

 

and only enable "Show Partial Sums" for Customer

Unbenannt.png

ArMehr
Contributor II
Contributor II
Author

Thank you so much for your quick reply Frank, Could you just explain how it works?

Mehr
Frank_Hartmann
Master II
Master II

the pick dim expression just adds an Extra Row with Name 'Total' to field Client.

and in order to do that you need to crate an island table in script!