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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors