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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
lawsonbe
Helper I
Helper I

Finding the most recent date from another table

I have two tables that deal with dates. One is a Date Table that contains a basic_date calculated column. This other table is an Instructional Date Calendar that contains all the days my school system has held class on for the past 5 years. Each day has an instructional day number. This allows me to lign up my dates across years irregardless of weekends and holidays. In hindsight, I probably should have simply included all my calculated columns and measures in the date table but I am too far down the road now. I now need to find the most recent instructional day for each day in the Date Table. I am trying to work around the weekends and holidays during the school day. Some of my metrics need to calculate the number of days a student is enrolled and if I try to simply use Today() and am looknig at a table on a weekend, there will be an error. I have read several threads that used Earlier but could just not get it to quite work. The two fields I think that I need from the Date Table are Date Key and Basic Date. I am attaching screenshots of the tables if that helps at all.

 

Date Table.jpgInstructional Date Table.jpg

1 ACCEPTED SOLUTION

I finally gave up and created an additional column in the table and manually entered the data I needed. Ultimately the way I was thinking about the formula would only create data for a single year. I really wanted to have repeating values for each school year. Thanks for you the response.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@lawsonbe,

 

You may try using TOPN.

https://community.powerbi.com/t5/Desktop/Find-last-value-based-on-date/m-p/293150#M129228

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I finally gave up and created an additional column in the table and manually entered the data I needed. Ultimately the way I was thinking about the formula would only create data for a single year. I really wanted to have repeating values for each school year. Thanks for you the response.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors