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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.