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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Aymeric_2350
Frequent Visitor

How do I find the latest date on a row?

Hi all,
Very new to power BI but trying to wrap my head around this one ...

I'm trying to get the latest date registered across different columns for each row separately.

Each line corresponds to an item that has several stages of completion but what I'm trying to get is the last date on which any of those stage was completed.

I'm not sure how to write the formula for that ... in excel, I would use something like =MAX(B2:I2) but it doesn't seem to work and I have some columns in the middle with non-date related content so that might be playing up in my issue ...

Thanks in advance !

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Power Bi is better at dealing with Columns rather than rows so you could Unpivot the date columns in Power Query and write a simple MAX measure or

Add a column in Power Query using List.Max() .  You would pass it a list of the column names.

-

If you want to keep the data in the original format and get a DAX solution, you would have to compare the values of each column with a lengthy series of comparisons.  Not ideal but I have seen code on the forum to do it.

View solution in original post

2 REPLIES 2
Aymeric_2350
Frequent Visitor

I ended up going with the lengthy comparison as I couldn't work out how to have the calculation based on the transposed data to change column for each following row if that makes sense ?

HotChilli
Super User
Super User

Power Bi is better at dealing with Columns rather than rows so you could Unpivot the date columns in Power Query and write a simple MAX measure or

Add a column in Power Query using List.Max() .  You would pass it a list of the column names.

-

If you want to keep the data in the original format and get a DAX solution, you would have to compare the values of each column with a lengthy series of comparisons.  Not ideal but I have seen code on the forum to do it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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