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
Memorable Member
Memorable Member

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
Memorable Member
Memorable Member

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
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors
Top Kudoed Authors