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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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]))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.