cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mafercz Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Highlighted
affan Established Member
Established Member

Re: Date of last change

Hi @Mafercz,

 

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

 

 

 

3 REPLIES 3
Super User
Super User

Re: Date of last change

Hi @Mafercz

 

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.

Highlighted
affan Established Member
Established Member

Re: Date of last change

Hi @Mafercz,

 

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

 

 

 

Mafercz Frequent Visitor
Frequent Visitor

Re: Date of last change

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