The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Solved! Go to 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.
You may try using TOPN.
https://community.powerbi.com/t5/Desktop/Find-last-value-based-on-date/m-p/293150#M129228
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.