Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
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
| date | holiday | 
| 1/1/2021 | 1 | 
| 1/2/2021 | 1 | 
| 1/3/2021 | 1 | 
| 1/4/2021 | 0 | 
| 1/5/2021 | 0 | 
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.
Solved! Go to Solution.
=List.Max(Table.SelectRows(Calendar,each [holiday]=1)[date])
 
					
				
		
You could also just use Table.Max, which lets you use two parameters, like
=Table.Max(PriorStepOrTableName, {"Date", "Holiday"})
--Nate
 
					
				
		
You could also just use Table.Max, which lets you use two parameters, like
=Table.Max(PriorStepOrTableName, {"Date", "Holiday"})
--Nate
=List.Max(Table.SelectRows(Calendar,each [holiday]=1)[date])
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
