cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Adavanced Editor help

I have the following code which takes population data, groups it by field of study and catches only those that are 500K or higher. 

Is there a way to do this, so that the filtered table is not grouped, in other words still showing all of the rows and colums before the grouping occured? Thanks in advance!

 

#"Grouped Rows" = Table.Group(#"Sorted Rows", {"Major Field of Study"}, {{"Field Total", each List.Sum([Value]), type number}}),
#"Filtered Rows1" = Table.SelectRows(#"Grouped Rows", each [Field Total] >= 500000)

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Adavanced Editor help

While Dales solution will work, on large volume of data it might soon become slow. Then you can use this technique instead: Just add another column in your Group-operation, that adds all the rows back as they were and expand that column afterwards: 

 

image.png

 

Happy and healthy new year everyone 🙂

If you liked my solution, please give it a thumbs up. An if I did answer your question, please mark my post as a solution. Thanks!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




View solution in original post

4 REPLIES 4
Super User
Super User

Re: Adavanced Editor help

Invoking @ImkeF, if anyone can answer this, she can. 


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Microsoft v-jiascu-msft
Microsoft

Re: Adavanced Editor help

Hi @Anonymous,

 

It seems you'd like to add a column. Please try the formula below. 

let current = [Major Field of Study] in List.Sum(Table.SelectRows(#"Sorted Rows", each [Major Field of Study] = current)[Value])

Adavanced-Editor-help

 

 

Best Regards,
Dale

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

Re: Adavanced Editor help

While Dales solution will work, on large volume of data it might soon become slow. Then you can use this technique instead: Just add another column in your Group-operation, that adds all the rows back as they were and expand that column afterwards: 

 

image.png

 

Happy and healthy new year everyone 🙂

If you liked my solution, please give it a thumbs up. An if I did answer your question, please mark my post as a solution. Thanks!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




View solution in original post

Anonymous
Not applicable

Re: Adavanced Editor help

Thank you guys for taking the time to respond to this - I will try out both of these solutions.

 

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)