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
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
Employee
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
Employee
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
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.