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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
ostur
Frequent Visitor

Sorting by most recent date

I really hope you can help me, and save me from a major headache.

 

My problem is that I have a list of names, grouped into several categories, but the way my system works is that every change to the directory results in a change only from that date. 

f.ex. if Name should be moved from City A to City B, and the change is made on 1 Jan, the new information will only work from 1 Jan, but all data prior to 1 Jan will show John in City A.

 

I am hoping I can:

  1. Take the list I have and group the information so that I have one name, all groups, but only the most recent date of each grouping
    NameCity AJan 1
    NameCity B

    Most recent date

     

  2. Filter the most recent date by name, and remove all groupings before that date
  3. Ending up with something like this

Untitled.png

 

Does that make any sense? Please let me know if you have any questions.

1 ACCEPTED SOLUTION
JoeBarry
Solution Sage
Solution Sage

Hi @ostur 

 

This informative video will help filter by the latest date https://www.youtube.com/watch?v=hidJ5T_DYQ0 

 

In Power Query 

  • highlight the Name column and in the ribbon, click on Group by
  • Add a new Column Name, lets say MaxDate, In Operation choose Max and Choose in Column the Date Column
  • Add another aggrigation and name it All. Operation should be All
  • Press OK
  • Expand the new column and untick Name as it's already in the table
  • In the MaxDate column filter the date to today
  • Then in the measure change todays date to the date column 

 

 

 

=[Date]​

 

 

 

  • This will show the last entry and it is dynamic, if there changes in the future, then these will be implemented.

 

 

Thanks

Joe

 

If this post helps, then please Accept it as the solution 

View solution in original post

2 REPLIES 2
JoeBarry
Solution Sage
Solution Sage

Hi @ostur 

 

This informative video will help filter by the latest date https://www.youtube.com/watch?v=hidJ5T_DYQ0 

 

In Power Query 

  • highlight the Name column and in the ribbon, click on Group by
  • Add a new Column Name, lets say MaxDate, In Operation choose Max and Choose in Column the Date Column
  • Add another aggrigation and name it All. Operation should be All
  • Press OK
  • Expand the new column and untick Name as it's already in the table
  • In the MaxDate column filter the date to today
  • Then in the measure change todays date to the date column 

 

 

 

=[Date]​

 

 

 

  • This will show the last entry and it is dynamic, if there changes in the future, then these will be implemented.

 

 

Thanks

Joe

 

If this post helps, then please Accept it as the solution 

Thank you so much Joe, you're a lifesaver!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.

Top Kudoed Authors