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

View all the Fabric Data Days sessions on demand. View schedule

Reply
JollyRoger01
Helper III
Helper III

Get value from column where date is max (latest) and is prior to current row date (Excel DAX)

I want to get some data within the same table where the date is the last date within the previous reporting period. All this is doing is allowing me to track progress of columns since the previous reporting period (normally around a month). I've included a workbook with the current table in one tab and the desired in the other. To get the desired I just found the 'Review Count' from 32 rows above and took it away from the current row Review Count, but this won't work once filtered. 

 

Book2 

3 REPLIES 3
Anonymous
Not applicable

[Previous Date] = // calculated column in table T
var CurrentDate = T[Date]
var PreviousDate =
	MAXX(
		TOPN(1,
			FILTER(
				DISTINCT( T[Date] ),
				T[Date] < CurrentDate
			),
			T[Date],
			DESC
		),
		T[Date]
	)
return
	PreviousDate

Might be what you want... but I have not opened the file since my company policy forbids it.

JollyRoger01
Helper III
Helper III

After reading my original question I've realised the description was a little vague and confusing so I've tried to make it a bit easier to follow. Below is a workbook showing what I am actually after. I am trying to retrieve the last date in a column that is less than the date of the current row being evaluated. I am not sure how to evaluate the current row and an entire column at the same time.

 

Example 

Anonymous
Not applicable

Please note that if you don't get answers for a long time, it means people don't understand your description. If you want to know what to do to get your questions answered quickly... How to Get Your Question Answered Quickly - Microsoft Power BI Community

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.