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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Get max date with conditions by Query

Hi,

 

I have a Calendar table and I am trying to get max date with conditions by Query.

How can I get 1/3/2021 (max date & holiday=1)?

 

Calendar table

dateholiday
1/1/20211
1/2/20211
1/3/20211
1/4/20210
1/5/20210

 

I have try this but those are returning  1/5/2021.

 

= List.Max(Calendar[date], each [holiday]= 1)
= List.Max(Calendar[date], each [holiday]= 0)

 

 

Any help would be greatly appreciated.

2 ACCEPTED SOLUTIONS
wdx223_Daniel
Community Champion
Community Champion

=List.Max(Table.SelectRows(Calendar,each [holiday]=1)[date])

View solution in original post

Anonymous
Not applicable

You could also just use Table.Max, which lets you use two parameters, like

 

=Table.Max(PriorStepOrTableName, {"Date", "Holiday"})

 

--Nate

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

You could also just use Table.Max, which lets you use two parameters, like

 

=Table.Max(PriorStepOrTableName, {"Date", "Holiday"})

 

--Nate

wdx223_Daniel
Community Champion
Community Champion

=List.Max(Table.SelectRows(Calendar,each [holiday]=1)[date])

Anonymous
Not applicable

@wdx223_Daniel 
Thank you😊

It worked😀

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.