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
Miro
Advocate I
Advocate I

How to get the number of rows per room

Hi Community,
I have a room list
room name last name   class age id student
106    Andre
106    null
107    null
108   Timo
I need to indicate whether the room is single or double. I was able to duplicate the table and group by in power query
106 -2
107 -1
108-1
but then i am merging back to the initial table, is there any other way jut to keep all the steps in one table?? without having to duplicate and merge?
Thanks

1 ACCEPTED SOLUTION
olgad
Super User
Super User

Hi there,
there is an option to pick all when you group by and count rows

olgad_0-1674061023586.png

then tick your columns except for the ones your were grouping by and expand

olgad_1-1674061117663.png

 

and there you have your table back as it was plus the count of rows.

olgad_2-1674061174154.png

Please kudo and accept the solution if it works for you.

 


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

View solution in original post

2 REPLIES 2
Miro
Advocate I
Advocate I

Oh, thats a nice trick, thank you!

olgad
Super User
Super User

Hi there,
there is an option to pick all when you group by and count rows

olgad_0-1674061023586.png

then tick your columns except for the ones your were grouping by and expand

olgad_1-1674061117663.png

 

and there you have your table back as it was plus the count of rows.

olgad_2-1674061174154.png

Please kudo and accept the solution if it works for you.

 


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

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.

Top Solution Authors
Top Kudoed Authors