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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Bi2thelly
Helper II
Helper II

Filter a merged table list to another date column

I'm not sure I'm doing this correctly but I merged two tables together but did not expand as I wanted records from one table tied to the main table. I'm trying to filter the records to get the max column value that is less than than a column value from the main table. I was trying to use List.Max and Table.Max but have not been able to get them to work correctly. Any insights on this would be great! What I'm looking for is the MAX GoLive_Actual that is less than the NOTI_START_DT.

List.Max([BridgHistory2][GoLive_Actual], 0,[BridgHistory2][GoLive_Actual] < [NOTI_START_DT])

 

Bi2thelly_0-1733786881755.pngBi2thelly_1-1733786944768.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Bi2thelly ,
Based on your description, you can try the following, first, filter the BridgHistory2 table to keep only the rows where GoLive_Actual is less than NOTI_START_DT. Then, find the largest GoLive_Actual date from the filtered table.

let
    BridgHistory2 = #"BridgHistory2",
    NOTI_START_DT = [NOTI_START_DT],
    FilteredTable = Table.SelectRows(BridgHistory2, each [GoLive_Actual] < NOTI_START_DT),
    MaxGoLiveActual = List.Max(FilteredTable[GoLive_Actual])
in
    MaxGoLiveActual

 

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
Bi2thelly
Helper II
Helper II

Thank you both for the reply. Both solutions work however, I went with the one using the variables as I may need to add more critieria. Thanks again!

Omid_Motamedise
Super User
Super User

Hi @Bi2thelly 

use the below formula (make sure both the columns are in type date)

 

 

=List.Max(List.Select([BridgHistory2][GoLive_Actual], (x)=> x < [NOTI_START_DT]))

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h
Anonymous
Not applicable

Hi @Bi2thelly ,
Based on your description, you can try the following, first, filter the BridgHistory2 table to keep only the rows where GoLive_Actual is less than NOTI_START_DT. Then, find the largest GoLive_Actual date from the filtered table.

let
    BridgHistory2 = #"BridgHistory2",
    NOTI_START_DT = [NOTI_START_DT],
    FilteredTable = Table.SelectRows(BridgHistory2, each [GoLive_Actual] < NOTI_START_DT),
    MaxGoLiveActual = List.Max(FilteredTable[GoLive_Actual])
in
    MaxGoLiveActual

 

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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