cancel
Showing results for 
Search instead for 
Did you mean: 
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
Solution Sage
Solution Sage

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!
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
Solution Sage
Solution Sage

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!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Helpful resources

Announcements
Winner of T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

Top Kudoed Authors