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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Date of last change

Hi, All.

 

I have different approval levels and approval dates, I want to generate a unique column with the last date at a row level. 

 

For example, in the first line the last approval was on 11/19/2018. Is there a formula o way to get the latest day evaluating different columns at a row level?

 

Image 2.png

 

Thank you so much for your time and feedback!

Maria

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

After looking at the image in your post I believe that the date of level 2 approval cannot be before level 1 approval. So I have added a custom column which brings the date from the last level of approval.

 

 

row max date.png

You can see the attached file for reference.

 

If this helped you, please mark this post as an accepted solution and like to give KUDOS .

 

Regards,

Affan

 

 

 

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous

 

DAX is geared towards working with columns, that's how you can unleash all its power. For instance, the function MAX( ), which you could use here, takes a column as argument. What you're looking for is the MAX( ) of values in a row. That can be done in DAX, but it would result unnecessarily complicated and cumbersome. 

You could:

1. Use the query editor for the operation: select the columns you want the max on and then go to Add Column tab > Statistics > Max

2. Use the Pivot/Unpivot feature in the query editor to get your table in a more convenient format like:

 

ID    Date_Approval        Level

1      10/11/2018               1   

1      11/08/2018               2

1      11/19/2018               4

 

Once in this format, you can fully apply the power of DAX. MAX([Date_Approval]) would be what you need here, for instance. Simple. I would recommend the second option.

Hi @Anonymous,

 

After looking at the image in your post I believe that the date of level 2 approval cannot be before level 1 approval. So I have added a custom column which brings the date from the last level of approval.

 

 

row max date.png

You can see the attached file for reference.

 

If this helped you, please mark this post as an accepted solution and like to give KUDOS .

 

Regards,

Affan

 

 

 

Anonymous
Not applicable

Thank you so much! it works perfectly for the row context that I have.

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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