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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SanderBeukers
Advocate I
Advocate I

Limit query results by filtering a column with a MAX function

Hi All,

 

I'm working on a report which pulls data from a database which contains about 200K rows per monthly snapshot. The report only has to contain data from the latest monthly period (ergo: the MAX or TOP 1 descending value of column "Period"). I can filter this in the report layer with DAX, but my goal is to filter it in the query editor itself, so the initial load won't have to load 200K times the amount of periods and will automatically pull new periods when the refresh hits. I've found the Table.Max and the List.Max functions, but i'm not quite sure how to use them correctly in the query editor.

 

Any thoughts?

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

@SanderBeukers,

 

Which databse are you connecting? If you use relational database, you can add this filter in your query.

 

Besides, you could use the embedded filter to filter your date.
Capture.PNG

 

Regards,

Charlie Liao

View solution in original post

2 REPLIES 2
v-caliao-msft
Microsoft Employee
Microsoft Employee

@SanderBeukers,

 

Which databse are you connecting? If you use relational database, you can add this filter in your query.

 

Besides, you could use the embedded filter to filter your date.
Capture.PNG

 

Regards,

Charlie Liao

Thanks, i wasnt aware if this built in feature.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors