Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Summarize columns by different operations compared to rows

Hello

 

I have a flat wide table that I'm trying to summarize differently across dates in columns (max) but by sum over the rows.

This is to produce a timeline showing how many components are installed at any given time.

 

The source looks like this:

yearmonthEOMVehicleComponentInstall dateIs Installed
2020131/01/2020MazdaRadio3/03/20200
2020229/02/2020MazdaRadio3/03/20200
2020331/03/2020MazdaRadio3/03/20201
2020430/04/2020MazdaRadio3/03/20201
2020531/05/2020MazdaRadio3/03/20201
2020630/06/2020MazdaRadio3/03/20201
2020131/01/2020MazdaWindscreen7/06/20200
2020229/02/2020MazdaWindscreen7/06/20200
2020331/03/2020MazdaWindscreen7/06/20200
2020430/04/2020MazdaWindscreen7/06/20200
2020531/05/2020MazdaWindscreen7/06/20200
2020630/06/2020MazdaWindscreen7/06/20201
2020131/01/2020FordRadio1/01/20201
2020229/02/2020FordRadio1/01/20201
2020331/03/2020FordRadio1/01/20201
2020430/04/2020FordRadio1/01/20201
2020531/05/2020FordRadio1/01/20201
2020630/06/2020FordRadio1/01/20201
2020131/01/2020FordWindscreen30/04/20200
2020229/02/2020FordWindscreen30/04/20200
2020331/03/2020FordWindscreen30/04/20200
2020430/04/2020FordWindscreen30/04/20201
2020531/05/2020FordWindscreen30/04/20201
2020630/06/2020FordWindscreen30/04/20201

 

What I am trying to see is:

  2020
VehicleComponent123456
MazdaRadio001111
MazdaWindscreen000001
FordRadio111111
FordWindscreen000111

 

I have used a measure to take the max of the 'Is Installed' so that when the columns are drilled up to "Year" it still shows 1 but how do I show the sum of the "is installed" when I drill up to Vehicle?

 2020
Vehicle123456
Mazda001112
Ford111222

 

Much Thanks

K

1 Reply