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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
ThreeChanges
New Member

Query Top N from Azure Table

Hi,

 

I am trying to get only the Top N entries from an Azure Table. Loading all hundres of GB would take hours and crash PowerBI, so I need to limit the results. Also, doing a filter on the timestamp is super slow.

 

I tried Table.FirstN, but it seems to load all entries from the table and then only take the first N in memory. I am looking for something similar to the Azure Table REST query param: https://myaccount.table.core.windows.net/Customers()?$top=10 (from https://docs.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities)

 

Is there a way to do this in Power BI?

 

My query looks like this:

let
Source = AzureStorage.Tables("azuretableurl"),
monitorlogs1 = Source{[Name="tablename"]}[Data],
filteredLogs1 = Table.SelectRows(monitorlogs1, each [PartitionKey] = "mail"),
topLogs1 = Table.FirstN(filteredLogs1, 100000),
#"Expanded Content" = Table.ExpandRecordColumn(topLogs1, "Content", {"AvgSetDuration", "AvgGetDuration", "AvgDeleteDuration", "AvgResponse", "AvgMailSchedule", "StuckMails"}, {"Content.AvgSetDuration", "Content.AvgGetDuration", "Content.AvgDeleteDuration", "Content.AvgResponse", "Content.AvgMailSchedule", "Content.StuckMails"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Content",{{"Content.AvgMailSchedule", "MailSchedule"}, {"Content.StuckMails", "StuckMails"}})
in
#"Renamed Columns"

1 REPLY 1
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @ThreeChanges,

 

I don't think there is a better solution here in this scenario currently. Here is a similar idea about filtering azure table storage from the URL share on Power BI Ideas for your reference. You can vote it up and add your comments there to improve Power BI on this feature. Smiley Happy

 

Regards

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.