Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
roniedhaka
Frequent Visitor

selecting multiple rows and combine them into single row in power BI desktop

Dear all- i need your kind help [ i am new in PBI dekstop]. or please direct me the solution link.

i have an massive excel file and i imported into power BI dekstop. Now instead doing it in excel [dont know which is more convenient], i want to combine multiple rows of below table [example below country 'b to e' into single row 'other' with combine data also [order/sales'margin].  how to perform?

 

 

1.jpg

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @roniedhaka ,

For your requirement, it should be easy to achieved in Power BI with creating the group.

You could click the More options beside the country column and then select New group.

group.PNG

Then you could create the table like below.

Capture.PNG

More details, please refer to my attachment.

Hope this can help you!

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @roniedhaka ,

For your requirement, it should be easy to achieved in Power BI with creating the group.

You could click the More options beside the country column and then select New group.

group.PNG

Then you could create the table like below.

Capture.PNG

More details, please refer to my attachment.

Hope this can help you!

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TomMartens
Super User
Super User

Hey,

 

what is the business rule that determines which countries are binned to the "group" other.

Maybe it's just as simple as to create a new column "group" and for country "a" assign the value "a" and for all other countries assign the value "other".

 

If it's not that easy as I assume, can you describe the underlying business rule, provide sample data (either pbix or xlsx) that reflects your data model, upload the file to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

thanks for your reply.

Actually there is no specific 'business rule'. I want to combine selected rows into a single row.

Column headers can be 'country' or 'products' or 'city' or anything- but values are always same order/sales/margin.

The 'other' showed above screenshot- i chose to make an example- nothing else.  One month certain countries are pinned into 'other'- perhaps next month new group of countries. All i want to know- how to comibine multiple rows [selection choices are mine] in to single row with column header 'other' and values order/sales/margin are also arithmatic SUM.  thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.