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
alex
Helper I
Helper I

Optimizing getting data from Exchange

Hello,

 

I've got a relatively simple query aggregating data from Office 365 Exchange accounts.....but it is slow.  Is there anything I can do to speed it up?  I've already tried turning off privacy.

Code below.

 

Much appreciated,

Alex

 

let
    emailaddress = "dummy@dummy.com",
    Source = Exchange.Contents( emailaddress),
    Mail1 = Source{[Name="Mail"]}[Data],
    #"Extracted Date" = Table.TransformColumns(Mail1,{{"DateTimeSent", DateTime.Date, type date}}),
    #"Expanded Sender" = Table.ExpandRecordColumn(#"Extracted Date", "Sender", {"Address"}, {"Sender.Address"}),
    #"Removed Other Columns" = Table.SelectColumns(#"Expanded Sender",{"Folder Path", "Sender.Address", "DateTimeSent"}),
    #"Grouped Rows" = Table.Group(#"Removed Other Columns", {"DateTimeSent", "Sender.Address", "Folder Path"}, {{"Count", each Table.RowCount(_), type number}})
 in
    #"Grouped Rows"

 

2 REPLIES 2
Anonymous
Not applicable

Do you need every record?  Could you filter out records by date, folder, or sender to cut down the amount of records before you need to expand?

Hi,

 

I tried filtering for the last 3 months and then expanding the "sender" attribute but it's still really slow.  You're right, it's the expansion of the record.

 

Yes, I ideally I want it...but it's just to slow....

 

Thanks,

Alex

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.

Top Solution Authors