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

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
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.