cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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 Smiley Happy

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

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!

v-jiascu-msft Super Contributor
Super Contributor

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 Smiley Happy

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

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
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 120 members 1,784 guests
Please welcome our newest community members: