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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Calculate a column that give the most recent date

Hi Power BI community

 

I would like to ask for your help.

I have a file that gives me the last activity of each users, on several services (5 services). I would like to create a column that gives me the last activity among all the services. For example

 

User          Last activity Service 1    Last activity Service 2  Last activity service x  Global last activity

User A        13/07/2020                 09/07/2020                  10/07/2020                  13/07/2020

User B         05/03/2020                10/04/2020                  20/05/2020                   20/05/2020

 

Is there a function that allows to do that ?


Thanks a lot ! 

Laura

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

If you wanted to push this work away from the data model, then you would use the List.Max() function in Power Query.

This gives me the following output:

LauraPlacenti.PNG

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

You can use Power Query to handle it more dynamically:

 

Capture.PNG

 

let _user = [User] in

List.Max(Table.Transpose(Table.RemoveColumns(Table.SelectRows(#"Changed Type", each [User] = _user), "User"))[Column1])

 

Just replace the bold part with your last step name.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



BA_Pete
Super User
Super User

Hi @Anonymous ,

 

If you wanted to push this work away from the data model, then you would use the List.Max() function in Power Query.

This gives me the following output:

LauraPlacenti.PNG

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




amitchandak
Super User
Super User

@Anonymous , try with Activity Date

lastnonblank(Table[date],blank())
or
lastnonblankvalue(Table[date],max(Table[date]))

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors