Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I have a pivot table like this:
I want to show partial sum like this:
I would be very glad you could help me.
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
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
Thank you so much for your quick reply Frank, Could you just explain how it works?
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!