Forum Discussion
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:
| year | month | EOM | Vehicle | Component | Install date | Is Installed |
| 2020 | 1 | 31/01/2020 | Mazda | Radio | 3/03/2020 | 0 |
| 2020 | 2 | 29/02/2020 | Mazda | Radio | 3/03/2020 | 0 |
| 2020 | 3 | 31/03/2020 | Mazda | Radio | 3/03/2020 | 1 |
| 2020 | 4 | 30/04/2020 | Mazda | Radio | 3/03/2020 | 1 |
| 2020 | 5 | 31/05/2020 | Mazda | Radio | 3/03/2020 | 1 |
| 2020 | 6 | 30/06/2020 | Mazda | Radio | 3/03/2020 | 1 |
| 2020 | 1 | 31/01/2020 | Mazda | Windscreen | 7/06/2020 | 0 |
| 2020 | 2 | 29/02/2020 | Mazda | Windscreen | 7/06/2020 | 0 |
| 2020 | 3 | 31/03/2020 | Mazda | Windscreen | 7/06/2020 | 0 |
| 2020 | 4 | 30/04/2020 | Mazda | Windscreen | 7/06/2020 | 0 |
| 2020 | 5 | 31/05/2020 | Mazda | Windscreen | 7/06/2020 | 0 |
| 2020 | 6 | 30/06/2020 | Mazda | Windscreen | 7/06/2020 | 1 |
| 2020 | 1 | 31/01/2020 | Ford | Radio | 1/01/2020 | 1 |
| 2020 | 2 | 29/02/2020 | Ford | Radio | 1/01/2020 | 1 |
| 2020 | 3 | 31/03/2020 | Ford | Radio | 1/01/2020 | 1 |
| 2020 | 4 | 30/04/2020 | Ford | Radio | 1/01/2020 | 1 |
| 2020 | 5 | 31/05/2020 | Ford | Radio | 1/01/2020 | 1 |
| 2020 | 6 | 30/06/2020 | Ford | Radio | 1/01/2020 | 1 |
| 2020 | 1 | 31/01/2020 | Ford | Windscreen | 30/04/2020 | 0 |
| 2020 | 2 | 29/02/2020 | Ford | Windscreen | 30/04/2020 | 0 |
| 2020 | 3 | 31/03/2020 | Ford | Windscreen | 30/04/2020 | 0 |
| 2020 | 4 | 30/04/2020 | Ford | Windscreen | 30/04/2020 | 1 |
| 2020 | 5 | 31/05/2020 | Ford | Windscreen | 30/04/2020 | 1 |
| 2020 | 6 | 30/06/2020 | Ford | Windscreen | 30/04/2020 | 1 |
What I am trying to see is:
| 2020 | |||||||
| Vehicle | Component | 1 | 2 | 3 | 4 | 5 | 6 |
| Mazda | Radio | 0 | 0 | 1 | 1 | 1 | 1 |
| Mazda | Windscreen | 0 | 0 | 0 | 0 | 0 | 1 |
| Ford | Radio | 1 | 1 | 1 | 1 | 1 | 1 |
| Ford | Windscreen | 0 | 0 | 0 | 1 | 1 | 1 |
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 | ||||||
| Vehicle | 1 | 2 | 3 | 4 | 5 | 6 |
| Mazda | 0 | 0 | 1 | 1 | 1 | 2 |
| Ford | 1 | 1 | 1 | 2 | 2 | 2 |
Much Thanks
K
Hi Anonymous ,
If you want to drill up to Vehicle, you need to convert Drill on Columns to Drill on Rows.
This is my PBIX file.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-kkf-msftCommunity Support
Hi Anonymous ,
If you want to drill up to Vehicle, you need to convert Drill on Columns to Drill on Rows.
This is my PBIX file.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.