Forum Discussion
Grouping table rows based on values
Hi,
I am new to PowerBI Desktop. I would like to group rows based on column values. Here I have given below example what I am trying to achieve. Can some one share me the step by step guiding document to do that.
Note : I have two separate table for County and City.
From :
Country | City |
USA | New York |
USA | Boston |
USA | Atlanta |
UK | London |
UK | Manchester |
UK | Birmingham |
UK | Liverpool |
To :
Country | City | Place | Open Hours |
USA | New York | Central Park | 10 AM |
|
| Times Square | 9 AM |
|
| High Line | 11 AM |
| Boston | Fenway Park | 10 AM |
|
| XXX | 1 |
|
| XXX | 2 |
| Atlanta | YYYY | 3 |
UK | London | A | 1 |
|
| B | 2 |
| Manchester | A | 1 |
|
| B | 2 |
|
| C | 3 |
Grouping table rows
Hi,
My problem resolved by using matrix and below tips.
"Once you have your values set in the row section of your matrix, go to your visualization. In the upper left, click the drilldown "Expand all down one level in the hierarchy" it is the right-side selection that forks. Click that until you get to the bottom level of what you want to see. Then go to the formatting option for the matrix, under "Row Headers" turn "Stepped layout" off.
That should list your matrix in a table style look while not repeating the valuse of the left side columns. "
Regards,
Vishnu
14 Replies
- vishnukumarAdvocate I
Hi,
I am new to PowerBI Desktop. I would like to group rows based on column values. Here I have given below example what I am trying to achieve. Can some one share me the step by step guiding document to do that.
Note : I have two separate table for County and City.
From :
Country
City
USA
New York
USA
Boston
USA
Atlanta
UK
London
UK
Manchester
UK
Birmingham
UK
Liverpool
To :
Country
City
Place
Open Hours
USA
New York
Central Park
10 AM
Times Square
9 AM
High Line
11 AM
Boston
Fenway Park
10 AM
XXX
1
XXX
2
Atlanta
YYYY
3
UK
London
A
1
B
2
Manchester
A
1
B
2
C
3
- MbpFrequent Visitor
Use the Matrix visualisation (it's in between the table and R script visuals).
- vishnukumarAdvocate I
Hi Phil_Seamark,
Thanks for you suggestion. Database re-creation is going on, I will try with matrix and let you know soon.
Mean while, is there any sample, then please share.
Regards,
Vishnu
- MbpFrequent Visitor
Did this resolve your issue?
- Phil_SeamarkMicrosoft Employee
- vishnukumarAdvocate I
Hi,
sorry for the delay. All fields like (Country, City, Place, Openhours) in a seperate tables.
Regards,
Vishnu
- CYParkerAdvocate II
This was a good solution for me until I added more "rows" than would fit on the screen and found I couldn't horizontal scroll :-(
- lokeshpatelFrequent Visitor
Hi CYParker
Were you able to find a solution to your problem? When you added more "rows" than could fit on the screen? I tried to see if there was an alternative in table visual but I could not find one.
Thanks for any help!
- CYParkerAdvocate II
Hi lokeshpatel
I wasn't unfortunately. I stopped working on it and haven't gone back to it in recent times to see if another solution has become available
- PriyankaBhamareRegular Visitor
Hi vishnukumar ,
These questions are similar to issue I'm facing. Please help me with linked question. Well, either power query editor or if there is any way to directly make it work in table visual, then let me know that too.
(groupby function in power query editor - Microsoft Fabric Community)
Thanks.