Forum Discussion
Parent - Child hierarchy in same row
We have a bit of a unique requirement to have a report with having parent - child heirarchy column in a single row as a header. In this mockup example, the user will select a Region at run time and it will display the Region (Parent) and Cities (Child) is this row format, rather than a stepped layout in matrix-
For ex. if user selects Region = West, then the output format will be in this format -
Region = East will give the output -
Just wanted to know what would be the best way to accomplish this requirement.
Hi nbitabc
There are 2 things that you have to deal with:1. The challenge is to get a region as a sub-total.
For this purpose, you need to create a table with all the cities and their origins.
I have an example with the same logic with customer segments so my table is :
The order column is for sorting them at the right order Regions always should be first.
This table should be related to your country table (for this scenario many to many it's ok )
That's it you can use it in the matrix :
The second thing you need the measures will be on rows :
This is just a switch from format values :
Pbix with my example is attached, you can follow my steps
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
3 Replies
- Ritaf1983
Super User
Happy to help 🙂
- Ritaf1983
Super User
Hi nbitabc
There are 2 things that you have to deal with:1. The challenge is to get a region as a sub-total.
For this purpose, you need to create a table with all the cities and their origins.
I have an example with the same logic with customer segments so my table is :
The order column is for sorting them at the right order Regions always should be first.
This table should be related to your country table (for this scenario many to many it's ok )
That's it you can use it in the matrix :
The second thing you need the measures will be on rows :
This is just a switch from format values :
Pbix with my example is attached, you can follow my steps
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly