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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aseagull
Helper III
Helper III

Power Query: Table.AggregateTableColumn runs infinite loop?

Hi. I hope someone can shed light on this without me trying to build a sample file. It seems absolutely bizarre to me. I have been merging queries and expanding table columns since I started in this tool a year+ ago. But I just went to aggregate a table column, and it's apparently in some kind of infinite loop: PQ tells me in the lower right that it's reading hundreds of MB of data (from a local file that is 11 MB) with no end or termination in sight.

 

But if I change from AggregateTableColumn to ExpandTableColumn, things work fine. Why is the aggregation sending me over a cliff?

 

If it helps: I'm merging a table with another where there is a many-to-many relationship (unofficially). I really just want to record the presence of a record from the first table in the second table. I was just going to aggregate and count the rows, so I could get 0, 1, 2, or maybe 3 depending on how many matches there are. I thought this was a simple thing to do? Otherwise, I'll have to create some more queries, removing dupes, appending, whatever...just seems like multiple queries and steps where AggregateTableColumn would have taken care of it very quickly.

 

Thanks for any ideas!

Amon

1 ACCEPTED SOLUTION
ImkeF
Super User
Super User

Hi @aseagull ,

I don't know why that is, but I've published a workaround for your problem here: Performance tip for aggregations after joins in Power Query and Power BI (thebiccountant.com)

 

Imke Feldmann (The BIccountant)

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

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

2 REPLIES 2
ImkeF
Super User
Super User

Hi @aseagull ,

I don't know why that is, but I've published a workaround for your problem here: Performance tip for aggregations after joins in Power Query and Power BI (thebiccountant.com)

 

Imke Feldmann (The BIccountant)

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

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

@ImkeF that's a great article. Thank you for sharing! I agree with your comment about the mysterious M engine...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors