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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
the_exception
New Member

Power Query Slow When Pulling Data From Exchange

I'm attempting to pull in Categories and Attributes.LastModifiedTime in via Power Query, but it's going exceedingly slow, taking about an hour and a half to grab the approximately 50,000 e-mails in our Shared Mailbox.

 

I'm still relatively new to Power Query, so I don't exactly have a baseline.  The below is the code utilized to pull data in, is there something I'm missing?

 

let
    Source = Exchange.Contents("teammailboxname@company.com"),
    Mail1 = Source{[Name="Mail"]}[Data],
    #"Removed Columns" = Table.RemoveColumns(Mail1,{"Subject", "Sender", "DisplayTo", "DisplayCc", "ToRecipients", "CcRecipients", "BccRecipients", "DateTimeSent", "Importance", "IsRead", "Attachments", "Preview", "Id", "Body"}),
    #"Extracted Values" = Table.TransformColumns(#"Removed Columns", {"Categories", each Text.Combine(List.Transform(_, Text.From), ";"), type text}),
    #"Expanded Attributes" = Table.ExpandRecordColumn(#"Extracted Values", "Attributes", {"LastModifiedTime"}, {"Attributes.LastModifiedTime"})
in
    #"Expanded Attributes"
1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @the_exception 

Do you use Power BI lastest version: September 2019 Update (2.73.5586.561)?

Or do you use power query for excel : version 2.59.5135.201 ? 

 

You could use Table.Buffer to speed up query.

There are many methods to speed up queries.

Speeding up power query

Performance tip for List.Generate (1): Buffer your tables in Power BI and Power Query

Table.Buffer for cashing intermediate query results or how workaround Unnecessary Queries Issue

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.