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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

If statement combined with a max date

Hi

 

I'm trying to combine an if statement with a max date. So if a value in a cell in 0 then retrieve the max date from several cells.

 

I tried the below but got an error as i dont think it like the combination of statements. Is there a way of doing this?

 

IF Column X = 0 then  List.Max({[#"Column a"]}&{[#"Column b"]}&{[#"column c"]}) else null

 

Thanks

1 ACCEPTED SOLUTION
jennratten
Super User
Super User

Please try this instead... 

each if [Column X] = 0 then List.Max({[Column A], [Column B],[Column C]}) else null

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

View solution in original post

2 REPLIES 2
jennratten
Super User
Super User

@Anonymous Please review the solution and click Accept as Solution if this answered your question.  Thanks!

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

jennratten
Super User
Super User

Please try this instead... 

each if [Column X] = 0 then List.Max({[Column A], [Column B],[Column C]}) else null

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

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.