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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
JollyRoger01
Helper III
Helper III

How to replicate the LOOKUP Excel formula in DAX (Excel 2016)

I am trying to replicate the LOOKUP formula in Excel that will return the Reporting Period End date for a date that falls between the Reporting Period Start Date and Reporting Period End Date. This is a fairly simple calc, but I have no idea how to do this in DAX. LOOKUPVALUE is not what I am looking for as it doesn't do greater than or equal two, that I know of. Workbook is below.

 

Book1 

 

 

1 ACCEPTED SOLUTION
JollyRoger01
Helper III
Helper III

This is the formula I was looking for:

=
CALCULATE
	(
	VALUES
		(
		XREF_ReportingPeriods[Reporting Period End]
		),
		FILTER
			(
			XREF_ReportingPeriods,
			[Date] >= XREF_ReportingPeriods[Reporting Period Start]
			&& 
			[Date]  <= XREF_ReportingPeriods[Reporting Period End]
			)
	)

View solution in original post

5 REPLIES 5
JollyRoger01
Helper III
Helper III

This is the formula I was looking for:

=
CALCULATE
	(
	VALUES
		(
		XREF_ReportingPeriods[Reporting Period End]
		),
		FILTER
			(
			XREF_ReportingPeriods,
			[Date] >= XREF_ReportingPeriods[Reporting Period Start]
			&& 
			[Date]  <= XREF_ReportingPeriods[Reporting Period End]
			)
	)
Jihwan_Kim
Super User
Super User

Picture1.png

 

end date in the period : =
IF (
HASONEVALUE ( Dates[Date] ),
MAXX (
FILTER (
Periods,
MAX ( Dates[Date] ) >= Periods[Reporting Period Start]
&& MIN ( Dates[Date] ) <= Periods[Reporting Period End]
),
Periods[Reporting Period End]
)
)

 

 

Link to the PBIX file 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

I have tried this, after changing all the table names to match mine, but I cannot get it to work (all the values are blank). I am adding it to a calculated column to Table_Historical.

wdx223_Daniel
Super User
Super User

wdx223_Daniel_0-1626844153958.png

 

I am looking to add this as a calculated column called Reporting Period End Dtate in Table_Historical. Do you know how I can do this, using the same names I have used?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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