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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Circuscazz
Helper I
Helper I

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

@Circuscazz 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors